After Installing Ruby Gems, Running the New Gem Returns "Could Not Find" Errors

After installing ruby gems, running the new gem returns Could not find errors

Seems the missing link was

$ rvm use ruby-1.9.3-p125 --default

Seems to have fixed it.

PS: Thanks for looking at this. For your entertainment, if you didn't see it on HN yet (it's python, but still a good chuckle): https://gist.github.com/289467

How to install a gem or update RubyGems if it fails with a permissions error

You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.

means exactly that, you don't have permission to write there.

That is the version of Ruby installed by Apple, for their own use. While it's OK to make minor modifications to that if you know what you're doing, because you are not sure about the permissions problem, I'd say it's not a good idea to continue along that track.

Instead, I'll strongly suggest you look into using either rbenv or RVM to manage a separate Ruby, installed into a sandbox in your home directory, that you can modify/fold/spindle/change without worrying about messing up the system Ruby.

Between the two, I use rbenv, though I used RVM a lot in the past. rbenv takes a more "hands-off" approach to managing your Ruby installation. RVM has a lot of features and is very powerful, but, as a result is more intrusive. In either case, READ the installation documentation for them a couple times before starting to install whichever you pick.

Timeout when installing ruby gems

In your Gemfile set your

source 'http://production.s3.rubygems.org'

This may not be an official answer, but it worked for me after three frustrating days trying to access rubygems.org.

bundle install returns Could not locate Gemfile

You just need to change directories to your app, THEN run bundle install :)

ruby gem not found although it is installed

You have two different versions of Ruby installed. First is in:

/usr/bin/ruby

and second one is in:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

The problem is that one is used in command line (i.e. to install gems) and another is used by web server to run Rails.

Since your web server is using second Ruby version one solution would be to install gem using that Ruby version. Alternatively, you can tell your web server to use different Ruby version - depending on which server you are using this can be achieved in different ways.

Running bundle install fails and asks me to run bundle install

OK guess I fixed it..

For the gems that running bundle install complained about when run from inside the app directory, I installed them by going outside the app directory and doing sudo gem install [gem] one by one. Doing bundle install --gemfile=myApp/Gemfile also installed a couple of the missing gems.

I have no idea why I wasn't able to just run bundle install from inside the app directory...lame.

Error when installing Ruby on Rails: Failed to build gem native extension

Rails 4.0 needs RubyGem version 2.0.3, Just update your system by using following command

gem update --system 2.0.3


Related Topics



Leave a reply



Submit