Friday, October 18, 2013

Could not find 'railties' (>= 0) among 8 total gem(s) (Gem::LoadError) when installing Rails 4 on Mac Lion

Found this issue after installed Rails 4 and using RVM for manage the Ruby version

when i type :
rails -v
it's make rise some errors like the below:
.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 8 total gem(s) (Gem::LoadError)
after googling about this issue, i have some references for solve the issue
possibility i was installing many times version ROR on mycomputer.
but i try the resolve my self, solved this.
here we go

1. Remove RVM

rvm implode

2. Check gem environment

gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.0
  - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-9
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/matt/.gem/ruby/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/

3. Cleanup all old Ruby

rm -rf /Library/Ruby/Gems/1.8
rm -rf /System/Library/Frameworks/Ruby.framework/Versions/1.8
rm -rf /Users/your_username/.gem/ruby/1.8
rm -rf /usr/lib/ruby/gems/1.8

4. Reinstalling Rails 4

Follow this link to install Rails 4

3 comments:

  1. Nice post ! Thanks for sharing valuable information with us. Keep sharing..Ruby on Rails Online Training India

    ReplyDelete
  2. Really nice blog post.provided a helpful information. More Info ruby on rails online training hyderabad

    ReplyDelete
  3. I like your post very much. It is very much useful for my research. I hope you to share more info about this. Keep posting Ruby On Rails Course

    ReplyDelete