I'm following a tutorial to learn Ruby + Rails, and can't get rspec to work for me.
http://rubysource.com/rails-deep-dive-loccasions-home-page/
I am up to 'Our First Test', and when I run rake spec I get the following error:
harley-alexanders-macbook-pro:loccasions Harley$ rake spec
/Users/Harley/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec ./spec/acceptance/home_page_spec.rb
/Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rspec/capybara (LoadError)
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/Harley/Sites/rails/loccasions/spec/spec_helper.rb:6:in `<top (required)>'
from /Users/Harley/Sites/rails/loccasions/spec/acceptance/home_page_spec.rb:1:in `require'
from /Users/Harley/Sites/rails/loccasions/spec/acceptance/home_page_spec.rb:1:in `<top (required)>'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `map'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load_spec_files'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:22:in `run'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run'
from /Users/Harley/.rvm/gems/ruby-1.9.3-p0#loccasions/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `block in autorun'
rake aborted!
/Users/Harley/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec ./spec/acceptance/home_page_spec.rb failed
Tasks: TOP => spec
(See full trace by running task with --trace)
I found multiple times that the issue was outdated gems, but I've updated them all and my Gemfile to reflect this as well.
I know that 'feature' is a method of capybara- gem used for matching scenarios, etc. I'm including require('rspec/capybara') in my spec/spec_helber.rb file as well as having it in my Gemfile.
What am I doing wrong!?
Cheers,
~Harley
Try instead:
bundle exec rake spec
Related
I'm following Rails Tutorials by Michael Hartl (chapter 3). However, when I edit the Gemfile like he did and then run rake test, rails suggested me to put this line : config.web_console.development_only = false
in the application config file. I did that and run bundle exec rake test again, here's the error message:
/home/ys/workspace/sample_app/db/schema.rb doesn't exist yet. Run `rake db:migrate` to create it, then try again. If you do not intend to use a database, you should instead alter /home/ys/workspace/sample_app/config/application.rb to limit the frameworks that will be loaded.
/home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- guard (LoadError)
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/guard-minitest-2.4.4/lib/minitest/guard_minitest_plugin.rb:4:in `<top (required)>'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:91:in `block in load_plugins'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:85:in `each'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:85:in `load_plugins'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:114:in `run'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:56:in `block in autorun'
I then proceeded to rake db:migrate, then run rake test again:
Running via Spring preloader in process 15638
/home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- guard (LoadError)
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/guard-minitest-2.4.4/lib/minitest/guard_minitest_plugin.rb:4:in `<top (required)>'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:91:in `block in load_plugins'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:85:in `each'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:85:in `load_plugins'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:114:in `run'
from /home/ys/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/minitest-5.8.4/lib/minitest.rb:56:in `block in autorun'
All I can guess is that there is something wrong with Ruby because I upgraded from 2.3.0 to 2.3.1 the other day as rails console complained about buggy, old version when I run bundle install.
So, How to fix this?
https://github.com/guard/guard-minitest
Add the guard gem to your gem file.
gem 'guard'
Looks like this might work:
1) Just remove guard-spring from your Gemfile and Guardfile.
2) Then upgrade guard-rspec (run bundle update guard-rspec)
3) Setup
guard-rspec to use spring (see this:
https://github.com/guard/guard-rspec#options)
From: https://github.com/guard/guard/issues/734
I've already seen some different answers, but none of these helped me...
This is the trick: I have to fix this without touching the Gemfile. I'm currently creating my working environment so that it matches the production server, so, I cannot modify the rails' code at all.
My OS: OSX 10.11
Ruby: ruby 2.0.0p643
Rails: 4.0.0
The gem is the Gemfile as gem 'mysql2'. There are no errors when doing bundle install, but when I try to rake db:migrate --trace this is the output:
rake aborted!
There was an error while trying to load the gem 'mysql2'.
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/Users/redar/redar/config/application.rb:7:in `<top (required)>'
/Users/redar/redar/Rakefile:4:in `require'
/Users/redar/redar/Rakefile:4:in `<top (required)>'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/bin/rake:23:in `load'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/bin/rake:23:in `<main>'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `eval'
/Users/redar/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `<main>'
I don't know how to interpret this. Is there something wrong with the Rakefile?
Also, this is the output from the mkmf.log
EDIT: This is the content of my Rakefile, located at myapp/folder
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
MyApp::Application.load_tasks
Try
bundle exec rake db:migrate
This will make sure that you are executing "rake db:migrate" with the gems listed in the Gemfile loaded and available. If you run it without "bundle exec" you may be executing only with the system gems available.
I have just upgraded to ruby 1.9.3-p125 (from 1.9.3-p0). All tests were working before the upgrade. Now I get the following error when running rake features
Using the default profile...
undefined method `config' for nil:NilClass (NoMethodError)
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-rails-1.3.0/lib/cucumber/rails.rb:17:in `<top (required)>'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/bundler-1.1.3/lib/bundler/runtime.rb:74:in `require'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/bundler-1.1.3/lib/bundler/runtime.rb:74:in `rescue in block in require'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/bundler-1.1.3/lib/bundler/runtime.rb:62:in `block in require'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
/home/map7/pais/config/application.rb:7:in `<top (required)>'
/home/map7/pais/config/environment.rb:2:in `require'
/home/map7/pais/config/environment.rb:2:in `<top (required)>'
/home/map7/pais/features/support/env.rb:8:in `require'
/home/map7/pais/features/support/env.rb:8:in `<top (required)>'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load_code_file'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:171:in `load_file'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `each'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:175:in `load_step_definitions'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:40:in `run!'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:43:in `execute!'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:20:in `execute'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/gems/cucumber-1.1.9/bin/cucumber:14:in `<top (required)>'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/bin/cucumber:19:in `load'
/home/map7/.rvm/gems/ruby-1.9.3-p194#rails3.2/bin/cucumber:19:in `<main>'
rake aborted!
Command failed with status (1): [/home/map7/.rvm/rubies/ruby-1.9.3-p194/bin...]
Tasks: TOP => features => cucumber => cucumber:ok
(See full trace by running task with --trace)
I traced this back to the rails.rb file line 17 as mentioned in the error:
if !Rails.application.config.cache_classes
warn "WARNING: You have set Rails' config.cache_classes to false (most likely in config/environments/cucumber.rb). This setting is known to cause problems with database transactions. Set config.cache_classes to true if you want to use transactions. For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165."
end
So it looks like it cannot find Rails.application when within cucumber.
If I go into the console 'rails c' and type Rails.application.config it does return the Configuration object.
I've tried upgrading my cucumber-rails gem to 1.3.0 and cucumber 1.1.9.
This is likely a load order issue with the cucumber-rails gem. If you update your Gemfile not to load it immediately it'll be required later on in the process:
gem "cucumber-rails", "1.3.0", :require => false
Anyone could help me?
I searched the same problem, but I can't figure out a solution still.
I ran successfully with "bundle update" "bundle install" but when running "rake db:migrate" I got the following problem...
rake aborted!
uninitialized constant Rake::DSL
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8:in `<clas
s:TaskLib>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:6:in `<modu
le:Rake>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:3:in `<top
(required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rdoc-3.11/lib/rdoc/task.rb:37:in `<top (requ
ired)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation
.rake:2:in `<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in `blo
ck in <top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `each
'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `<top
(required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:
in `initialize_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:139:
in `load_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:77:i
n `method_missing'
C:/F/desktop/Projects/recle/recle/rails/eway/Rakefile:7:in `<top (required)>'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `load'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in `run'
C:/Ruby192/bin/rake:31:in `<main>'
Put this in your Rakefile above require 'rake':
require 'rake/dsl_definition'
OR if the above solution does not work,
write this in your gemfile for rake
gem "rake", "0.8.7"
and go to command prompt and write.
gem uninstall rake
This will uninstall the existing rake gem.
Then type bundle update in your project folder which will install rake 9.8.7 again.
And enjoy rails :).
I am working on Ubuntu 10.04 LTS, Lucid Lynx, have installed Ruby on Rails 3 on it. I am not able to start Rails server. I am getting the following error.
mah#mah-laptop:~/Desktop/projects/ver$ rails s
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.8/lib/rails/commands.rb:29:in `block in <top (required)>': undefined method `root' for nil:NilClass (NoMethodError)
from /home/mah/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.8/lib/rails/commands.rb:27:in `tap'
from /home/mah/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.8/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I am using Rails 3.0.8 and rake version 0.8.7
I tried bundle exec but got same error.
Thanks for any help in advance
UPDATE
Here is what I get after bundle exec rake db:migrate --trace
mah#mah-laptop:~/Desktop/projects/ver$ bundle exec rake db:migrate --trace
rake aborted!
uninitialized constant Ver
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing_from_s3_library'
/home/mah/Desktop/projects/ver/Rakefile:7:in `<top (required)>'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/mah/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/mah/.rvm/gems/ruby-1.9.2-p0/bin/rake:19:in `load'
/home/mah/.rvm/gems/ruby-1.9.2-p0/bin/rake:19:in `<main>'
This error means that Rails.application isn't initialized. I didn't actually know that, I
cheated.
So that then begs the question: how did you set up this application?
Perhaps this application doesn't contain a config/application.rb file that defines a class that inherits from Rails::Application and therefore is causing this problem. In my application here, I've got this one you could use as an example.