Gem problems with rbenv and bundler

I ahve rbenv installed with Ruby 1.9.3-p374 package installed and I gem.

Then I set the project directive and set the .ruby version file inside to select the 1.9.3 ruby ​​version and then added a gemfile with some gems like compass etc. Then I launched bundle install --path vendor

and installed.

If I run bundle show

I get the following:

Gems included by the bundle:
  * bundler (1.2.3)
  * chunky_png (1.2.7)
  * compass (0.12.2)
  * fssm (0.2.10)
  * sass (3.2.5)
  * susy (1.0.5)

      

and if i run gem list

i get this:

*** LOCAL GEMS ***

bigdecimal (1.1.0)
bundler (1.2.3)
io-console (0.3)
json (1.5.4)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.4)

      

How can I make them work together. I want the local project stones like compass etc. to be installed in the vendor directory as they are, but when I connect to the project directory and run the compass watch command I get-bash: compass: command not found

Why isn't it working?

+3


source to share


1 answer


When launching gems from a vendor package (instead of local gems), you should use bundle exec

:

~/project$ bundle exec compass watch

      



If you want to run Compass directly, you will need to install it on your system (local gems) using either vanilla bundle install

or just gem install compass

. (In this case, you can sometimes run into version conflict gem, Gemfile and called from the system)

+2


source







All Articles