I recently had some problems trying to run the executable for a gem I had installed using gem with an RVM setup. I didn’t really know where to start, but after a bit of searching around I finally solved my problem, here are the steps that helped me out of this situation.
First make sure your gem is correctly installed. You can do this by typing:
Which will list all installed gems.
If you want to get more info on a specific installed gem you can do the following command:
gem specification <gemname>
If the gem is installed correctly and everything seems to be in order, the next step is to check your gem environment with the following command:
This command should give you the Ruby version used by your gem environment and the paths where the gems and their executables are located.
You can compare this version to the one used by RVM:
You can see which version of Ruby RVM is currently configured to use. Both version should match. If they don’t, switch the current version used by RVM using:
rvm use <ruby-version>
Here you may have some problems running this last command if you are using the gnome standard terminal. If this is your case, in your terminal go to: Profiles -> Edit Profiles -> Title and Command, and check “Run command as login shell”.
Once this is done, if the problem still persists make sure that the path EXECUTABLE DIRECTORY shown under gem env is in your PATH environment variable.