Rails: Failed to find raids

➜ ~ rvm -v rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/] ➜ ~ ruby -v ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0] ➜ ~ rails -v /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError) from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1208:in `gem' from /Users/hb/.rvm/gems/ruby-1.9.3-p0/bin/rails:18:in `<main>' ➜ ~ 

I installed a clean ruby ​​installation just now, and rails, I removed all my previous gems, and I still keep getting this error. Any ideas? And yes, I had this error before, and this is what I did

A bit more info:

 ➜ ~ gem list *** LOCAL GEMS *** actionmailer (3.2.1) actionpack (3.2.1) activemodel (3.2.1) activerecord (3.2.1) activeresource (3.2.1) activesupport (3.2.1) arel (3.0.0) builder (3.0.0) bundler (1.0.22 ruby) erubis (2.7.0) hike (1.2.1) i18n (0.6.0) journey (1.0.1) json (1.6.5) mail (2.4.1) mime-types (1.17.2) multi_json (1.0.4) polyglot (0.3.3) rack (1.4.1) rack-cache (1.1) rack-ssl (1.3.2) rack-test (0.6.1) rails (3.2.1) railties (3.2.1) rake (0.9.2.2, 0.9.2) rdoc (3.12) sprockets (2.3.0, 2.1.2) thor (0.14.6) tilt (1.3.3) treetop (1.4.10) tzinfo (0.3.31) ➜ ~ gem install rails Successfully installed rails-3.2.1 1 gem installed Installing ri documentation for rails-3.2.1... Installing RDoc documentation for rails-3.2.1... ➜ ~ rails -v /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError) from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1208:in `gem' from /Users/hb/.rvm/gems/ruby-1.9.3-p0/bin/rails:18:in `<main>' ➜ ~ 
+48
ruby-on-rails rubygems
Feb 09 2018-12-12T00:
source share
11 answers

rvm implode was the answer. Something may have gone wrong before, now everything works after reinstalling rvm.

+14
Feb 09 '12 at 16:30
source share

This means that your Rails installation is damaged or incomplete. If you list your gems, chances are you will not find railties

 $ gem list 

Run the command

 $ gem install rails 

again. It will download and install missing dependencies, including railties.

+92
Feb 09 2018-12-12T00:
source share

I ran into the same problem, and in my case it turned out because I installed using sudo - this does not necessarily make rails accessible to ordinary users. Try running only gem install rails if you previously run sudo gem install rails .

+31
Dec 22 2018-12-12T00: 00Z
source share

I ran into this problem. If you use RVM, you may have switched to the wrong version of Ruby, which causes a gem loading error if the directory uses a different version than the one you are currently configured to use.

To fix, enter rvm -yourrubyversion in the application directory in the terminal. For example, if your application is configured to use Ruby 1.9.3 such as rvm use -1.9.3.

RVM works by separating your gems from the ruby ​​version of the application, so if you switch to another ruby ​​version, RVM separates previously used and installed gems from another ruby ​​version, so you can see this problem.

+16
Apr 26 2018-12-12T00:
source share

Worked for me

 rvm reinstall 1.9.3 

then

 gem install rails 
+16
Nov 22 '12 at 23:24
source share

You may have installed two or more versions of rails and rails.

 gem uninstall railties gem uninstall rails 

then reinstall.

+7
Mar 31 2018-12-12T00:
source share

I have the same error when I installed ruby ​​1.9.3p194

and then I reinstalled rubies and rails

+5
Aug 08 2018-12-12T00:
source share

Simon's answer is great. However, if you already have your own Rails-gem in the Gemfile, try using the package instead:

 bundle exec rails c 

And that should be enough. If not, add

 bundle install 

before the specified command.

+1
Jan 30 '14 at 16:51
source share

I also had this problem after installing ZSH (Required to mess with the templates with it.)

Ran

 brew update 

which found some updates that I had not missed before, but in the end

 gem install rails 

suddenly completely reinstall the rails / ties system. It is not clear why ZSH deleted it.

+1
04 Oct '15 at 0:51
source share

Removing rubies and railsinstaller and then installing railsinstaller again worked great for me!

0
Mar 08 '13 at 13:56 on
source share

I made "gem install rails" on my system (ubuntu) and he installed the missing gems on about 28 of them, after which I made a "list of gems" to check, and it was all there.

0
Jul 21 '14 at 4:49
source share



All Articles