Search code examples
ruby-on-railslinux-mint

error generating new app with rails 4.0.0.rc1 on Linux Mint 14


I've installed rails 4.0.0.rc1 on Linux Mint v14 Nadia.

When I run

rails new something

It's giving me error (I'll put here only the last lines):

create vendor/assets/stylesheets/.keep run bundle install /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/ui.rb:36:in initialize': undefined method[]' for # (NoMethodError) from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:in new' from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:ininitialize' from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:in new' from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:indispatch' from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:386:in start' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:inblock in ' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in with_friendly_errors' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in'

Then I change directory to check dependencies:

cd something
bundle check

It says:

Resolving dependencies... Bundler can't satisfy your Gemfile's dependencies. Install missing gems with bundle install.

Then I run:

bundle install

And it's showing:

Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Enter your password to install the bundled RubyGems to your system: 
Installing rake (10.0.4) 
Using i18n (0.6.4) 
Using minitest (4.7.4) 
Using multi_json (1.7.3) 
Using atomic (1.1.9) 
Using thread_safe (0.1.0) 
Using tzinfo (0.3.37) 
Using activesupport (4.0.0.rc1) 
Using builder (3.1.4) 

... and so on that's taking more than an hour and still being run.

I thinks there's some strange things happening here. Maybe my installation was not correct...


Solution

  • I found the solution. I added:

    source ~/.bash_profile
    

    on to .bashrc.

    The content of the .bash_profile:

    [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session as a function