3
votes

I installed the new Ruby (2.0) and Rails 4.0 and when i do "Rails new test_app" i get the following. Anybody run into this?

[devuser@devbox ~]$ rails new test_app

/usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require': cannot load such >file -- active_support (LoadError) from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/lib/rails/generators.rb:4:in ><top (required)>' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require' from /usr/local/lib/ruby/gems/2.0.0/gems/railties->4.0.0.beta1/lib/rails/commands/application.rb:28:in' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/lib/rails/cli.rb:15:in <top >(required)>' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/bin/rails:7:in' from /usr/local/bin/rails:23:in load' from /usr/local/bin/rails:23:in'

2
Did you try rails 4.0.0.rc1 instead? - mikdiet
I tried that and it didn't work. I found my problem was permission related(see answer) - salah-1

2 Answers

3
votes

My problem was permission related. Somehow, the "other" user needs rx permissions. I did the following and it works now:

sudo chmod -R o+rx /usr/local/lib/ruby/gems/2.0.0/gems/

If you getting cannot load such file and its pointing to require statement, check your permissions for /gems folder and folders underneat.

1
votes

Create an gemset and use it in rvmrc.

Then come out of the project using Cd ../

Again enter into project, this time it will show, "RVM has encountered a new or modified .rvmrc file in the current directory"

Type 'Yes'.

and now give bundle install.

It will work.