Roko
Roko

Reputation: 1335

RVM doesn't recognize installed gem, so bundle install fails

Bundle install command fails because gem install pg fails:

Make sure that `gem install pg -v '0.17.1'` succeeds

I can though, install pg with certain options:

gem install pg -- --with-pg-include=/usr/pgsql-9.3/include --with-pg-dir=/usr/pgsql-9.3

Still.. running bundle install fails, saying:

Make sure that `gem install pg -v '0.17.1'` succeeds

Well ye I know it fails, that why I installed it before, with options given, How do I make the bundle see it the gem is already installed.? (or maybe make the bundle command to run gem install pg -- --with-pg-include instead of gem install pg -v '0.17.1' so it will succeed)

I also use rvm, and i'm rather clueless about it, so maybe even though I the pg gem is installed:

gem list pg
*** LOCAL GEMS ***
pg (0.17.1)

The application doesn't recognized the installed pg gem? if so How do I make the application's rvm see that the required gem is already installed?

Thank you

Upvotes: 1

Views: 174

Answers (2)

ddd
ddd

Reputation: 1985

So you know in the future, this wasn't an RVM issue. This was a bundler and gem command parameter passing issue. RVM wasn't involved at that stage.

Upvotes: 0

Roko
Roko

Reputation: 1335

Finally found answer: How can I pass a parameter for gem installation when I run bundle install?

So in my case:

bundle config build.pg --with-pg-include=/usr/pgsql-9.3/include --with-pg-dir=/usr/pgsql-9.3
bundle install

And that took a day, well could have been worse

Upvotes: 1

Related Questions