Ruby Gem Not Found Although It Is Installed

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.

Ruby on Rails: gem not found even though it is installed

Did you try to upgrade the echoe version?

sudo gem update echoe

It's strange. All ultrasphinx task are properly defined in a .rake file that should be loaded by Rails without passing through the plugin Rakefile file.

Also make sure you run

rake ultrasphinx:configure

from the project root and not the plugin root.

Ruby gems not found, but they're installed

Found it. I had forgotten that I had previously unpacked the gems, so I looked under vendor/gems of my rails project, and sure enough, neither the authlogic nor the machinist gem directories had any code in them (although the directory did exist and contained a .specification file). So, to fix this I did this:

rake gems:unpack:dependencies
rake gems:build

To verify what I had done:

rake gems

Now script/console and Apache/Passenger work fine!

Gem Command not found

Are you wanting ruby gems? If so, you need to install libgemplugin-ruby and then the ruby 'gem' program will be in your path:

aptitude install libgemplugin-ruby

Gem installed but 'command not found'

So you're working with rbenv. According to its README, you should run rbenv rehash after installing any gems that have an executable command. Also, run it anytime you install a new Ruby version.

Ruby Gems returns command not found

Your $PATH variable needs to include the exact path to your Ruby's bin directory. Adding a directory to the PATH does not include it's subfolders. Try adding the bin directory via:

export PATH=$PATH:/home/adam/.gem/ruby/1.8/bin

or if you installed the gem using sudo:

export PATH=$PATH:/usr/lib/ruby/gems/1.8/bin

You might want to add this to your .bashrc file, so that you don't have to set this manually every time your open up a new bash.



Related Topics



Leave a reply



Submit