On Friday, July 12, 2013 at 12:20, Daniel DeLeo wrote:
On Wednesday, July 10, 2013 at 6:32 AM, Cassiano Leal wrote:
Hi,I’m using the chruby 0.2.1 cookbook to install Ruby on a server.I’m going to run a Rails application there, but bundle install fails to compile the pg gem. Since I can compile the gem just fine in the shell, my guess is that bundle is running with the system Ruby.I tried to use the bundle_command attribute like such:application “rails_app” do...rails dobundler truebundle_command ". /etc/profile.d/chruby.sh && bundle install --binstubs"endendbut that fails:---- Begin output of . /etc/profile.d/chruby.sh && bundle install --binstubs install --path=vendor/bundle --deployment --without development test cucumber staging ----STDOUT:STDERR: sh: 1: /etc/profile.d/chruby.sh: source: not foundsh: 2: /etc/profile.d/chruby.sh: source: not foundsh: 3: /etc/profile.d/chruby.sh: Syntax error: word unexpected (expecting ")")---- End output of . /etc/profile.d/chruby.sh && bundle install --binstubs install --path=vendor/bundle --deployment --without development test cucumber staging ----Ran . /etc/profile.d/chruby.sh && bundle install --binstubs install --path=vendor/bundle --deployment --without development test cucumber staging returned 2I’ve also tried to source /usr/local/chruby/share/chruby/chruby.sh directly, but that also fails with similar errors.What’s the best approach to correcting this problem?Thanks!- cassianoUgly hack that should work is to wrap your bundle command in bash -c. According to the README chruby supports bash or zsh, I'm guessing the basic bourne shell (/bin/sh) doesn't work.I'm not familiar with the application cookbook, so I don't know what's involved in making it support running bundle_command in bash.--Daniel DeLeo
Archive powered by MHonArc 2.6.16.