views:

762

answers:

3

Hello all, I just did a first time ruby enterprise edition, installed some gems, and now I'm trying to do a
' sudo ./rake gems:install' and getting a:

rake aborted!
No Rakefile found

error. Firstly, what directory should I be doing this from?

Here are the steps I've followed:
download ruby enterprise from http://www.rubyenterpriseedition.com/download.html wget http://rubyforge.org/frs/download.php/68719/ruby-enterprise-1.8.7-2010.01.tar.gz

./ruby-enterprise-X.X.X/installer

/opt/ruby-enterprise-1.8.7-2010.01/bin/gem install mysql

ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/gem /usr/bin/gem
ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/rake /usr/bin/rake

and I've installed several gems

I have found the appropriate directory (I think), and am still getting errors. Here's a copy of rake with --trace:

dan@dev:~/myApp.com-ror$ rake --trace gems:install
(in /home/dan/myApp.com-ror)                      
** Invoke gems:install (first_time)                  
** Invoke gems:base (first_time)                     
** Execute gems:base                                 
** Invoke environment (first_time)                   
** Execute environment                               
rake aborted!                                        
No such file or directory - /home/dan/myApp.com-ror/config/database.yml                                                    
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:902:in     `read'                                  
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:902:in  `database_configuration'                
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:437:in `initialize_database'                   
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:141:in `process'                               
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'                                  
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'                                   
/home/dan/songness.com-ror/config/environment.rb:14            
/home/dan/Languages/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in  `gem_original_require'                       
/home/dan/Languages/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'                                    
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'       
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'                                                             
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'       
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4                                             
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'                                          
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'                                       
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'                                          
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'                                       
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'                        
/home/dan/Languages/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'                                                         
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'                        
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'                                        
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/gems.rake:17                                            
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'                                          
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'                                       
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'                                          
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'                                       
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'                        
/home/dan/Languages/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'                                                         
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'                        
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'                          
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'                                          
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'                          
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'                         
/home/dan/Languages/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'                                                         
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'                        
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'                                        
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'                                  
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'                                    
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/dan/Languages/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

And what should database.yml look like?

A: 

If you have not set your path up correctly then you will need to run this from the rails directory.

steve
+2  A: 

rake gems:install is to install gems for your app. You have to run this inside your app root directory. To install gems on your machine use gem install.

Teja Kantamneni
What exactly is my app root directory? something like ruby/bin? or ruby/bin/gems?
danwoods
no app root directory is your rails app root, when you create an app like `rails myapp` rails will create a directory/folder called `myapp` where it add all the source code needed for the app. It is your app root directory
Teja Kantamneni
I'm setting up a development environment and haven't begun working with any apps yet. How do I do a 'rake gems:install' with no app?
danwoods
then use `gem install` to install gems, you will need rake gems:install only when working in a project
Teja Kantamneni
A: 

Ok I've looked in the docs

$ /opt/ruby-enterprise-X.X.X/bin/gem install rails

in your case means just:

gem install rails

When you mentioned ' sudo ./rake gems:install' what were you trying to achieve?

Once installed rails do:

rails myproject

And there you go.

pdjota
But I haven't started any projects yet. I'm following instructions to setup a development environment...
danwoods
Have you tried? sudo gem install railsAny errors there?
pdjota
See edited original post...
danwoods
The database.yml is a configuration file for RAILS to access the database. It should have been created when you ran: rails myApp.com-ror
pdjota