0

I have installed rvm ruby 1.9.3 and rails 3.0.5, and am trying right now to enter the "rails server" command line but this is what I get:

badr@Badoo:~/rails_projects/first_app$ rails s
/home/badr/rails_projects/first_app/config/application.rb:7:in `<top (required)>': undefined method `groups' for Rails:Module (NoMethodError)
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:28:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

I have been following this tutorial . I'm using ubuntu 12.04 lts and I guess I don't need to tell you that I'm a newbie...

I really don't know what's wrong (railties gem? the rvm?), I've been googling for a solution the whole day.

Thanks in advance

2
  • Is there a reason you are using such an old stack? Try using ruby 2.0 and rails4 or at least 3.2. I don't know exactly what's wrong here but I guess it somehow could be a problem between your ruby version and your rails version. Commented May 30, 2013 at 13:16
  • Possible duplication: stackoverflow.com/questions/6822904/… Commented May 30, 2013 at 13:18

1 Answer 1

0

First. update your rails to the current stable version 3.2.13 and see if the error is gone (It will be) also update your ruby to 2


else:

See if this works:

https://stackoverflow.com/a/13275655/1379394

In config/application.rb substitute

if defined?(Bundler)
Bundler.require(*Rails.groups(:assets => %w(development test)))
end

With

Bundler.require(:default, Rails.env) if defined?(Bundler)

And another question. why are you using rails 3.0.5? 3.2.13 released Mar 18, 2013

Sign up to request clarification or add additional context in comments.

2 Comments

Oh thank you so much! :) I installed rails 3.0.5 so that I could follow that tutorial. But I didn't think about that, so I reinstalled everything with the last updates and everyhting works fine now. I guess I need to follow a more recent tutorial/book. thanks again :)
Yes you need to search for tutorials on rails 3.2 or higher. Then you know it will always work. great I could help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.