Hi Justin http://capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/ is a good place to start to work out what's going on. Your situation is unusual in that you are relying on rbenv to be active when you run nodejs, to have access to a suite of Ruby gems. You might be able to use :rbenv_map_bins, but more likely you'll need to approach someone who uses rbenv in production to find out how to make this work for you.
Honestly, having been in the same situation some years ago, I dropped compass. Ruby using JavaScript to build Ruby to compile CSS struck me as unnecessarily complicated, so I simplified everything. (Compass is a monster.) The problem is though that the rbenv plugin for Capistrano takes care for the binaries in :rbenv_map_bins, but not for node, started via ruby, starting javascript to start ruby. I'm not sure this is the message you want. The bottom line is don't use rbenv in production. I always use BrightBox's packages [1] when I can, or find someone who provides binary packages for my OS. You can always take binaries from rvm and unpack them into /usr/local or wherever. [1]: https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng [2]: https://rvm.io/binaries/ Lee Hambley http://lee.hambley.name/ +49 (0) 170 298 5667 On 14 November 2016 at 22:08, <[email protected]> wrote: > I've updated the code to use that module, but I don't think it's doing > what we need. I think the problem stems from our setup and I'm not sure how > to work around it. We're using NPM to call Grunt which in turn runs > Compass. When Grunt runs Compass, we receive this error: > > > > DEBUG [42d8fbc2] *Running "compass:release" (compass) task* > DEBUG [42d8fbc2] Warning: Command failed: /bin/sh: compass: command not > found > Use --force to continue. > Aborted due to warnings. > > > > Compass is installed, but only as part of rbenv: > > [*justin.spies@**ip-111-111-111-111 **~*] :) which compass > > /opt/rbenv/shims/compass > > > When I SSH to the server and run the Grunt command manually, however, it > works just fine: > > [*justin.spies@**ip-**111-111-111-111** dev.yoursite.com > <http://dev.yoursite.com>*] :( sudo su - builds > > [sudo] password for justin.spies: > > [*builds@**ip-**111-111-111-111* *~*] :) cd /var/www/dev.yoursite.com/ > > [*builds@**ip-**111-111-111-111** dev.yoursite.com > <http://dev.yoursite.com>*] :) grunt > > Running "compass:release" (compass) task > > write skin/frontend/buyerquest/default/css/admin.css (9.968s) > > write skin/frontend/buyerquest/default/css/login.css (1.455s) > > So I'm not sure if there is something I can do differently in Capistrano > or if there is some kind of limitation in Grunt / Compass / Ruby / > Capistrano / Bash. Any thoughts would be appreciated. > > > On Wednesday, November 9, 2016 at 10:38:07 AM UTC-5, > [email protected] wrote: >> >> No - let me try that and I'll post back to this list. Thank you. >> >> >> >> On Monday, November 7, 2016 at 11:32:27 AM UTC-5, Lee Hambley wrote: >>> >>> Were you using https://github.com/capistrano/rbenv ? >>> >>> Lee Hambley >>> http://lee.hambley.name/ >>> +49 (0) 170 298 5667 >>> >>> On 7 November 2016 at 15:51, <[email protected]> wrote: >>> >>>> >>>> >>>> On Sunday, November 6, 2016 at 11:51:16 AM UTC-5, Lee Hambley wrote: >>>>> >>>>> Justin, >>>>> >>>>> Were you still struggling with this? >>>>> >>>>> Lee Hambley >>>>> http://lee.hambley.name/ >>>>> +49 (0) 170 298 5667 >>>>> >>>>> On 4 November 2016 at 14:00, <[email protected]> wrote: >>>>> >>>>>> Versions: >>>>>> >>>>>> - Ruby - ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] >>>>>> (from /opt/rbenv/shims/ruby) >>>>>> - Capistrano - 3.5.0 >>>>>> - Rake / Rails / etc - not installed / used >>>>>> >>>>>> Platform: >>>>>> >>>>>> - We are deploying a custom PHP application to a cluster, the >>>>>> deploy works fine, until the code tries to run compass, then we >>>>>> receive the >>>>>> following: >>>>>> >>>>>> *Running "compass:release" (compass) task* >>>>>> DEBUG [325e3552] Warning: Command failed: /bin/sh: compass: command >>>>>> not found Use --force to continue. >>>>>> >>>>>> I read http://capistranorb.com/documentation/advanced-features/ptys/ and >>>>>> it specifically calls out that rbenv causes issues, however the >>>>>> documentation doesn't provide links on how to fix anything. Now, we're >>>>>> not >>>>>> using multiple versions of Ruby as mentioned in the document, but we are >>>>>> using rbenv so we can run Ruby 2.2 on CentOS 6.x. The default on Cent 6 >>>>>> is >>>>>> 1.8 and our want / need is to use 2.2 because it is several orders faster >>>>>> with Compass than 1.8. But rbenv relies on files in /etc/profile.d. >>>>>> >>>>>> >>>>>> I would be appreciative if someone could just point me to >>>>>> documentation on how to properly implement a solution - do I just use the >>>>>> 'with bash_env: "some path" do' method? Or is the "right" answer that we >>>>>> are forced to use Ruby 1.8 because that is the RPM / platform specific >>>>>> and >>>>>> supported version (I probably would be willing to break with standards if >>>>>> that is the case though - Ruby 2.2 is 2x-4x faster than Ruby 1.8 from >>>>>> what >>>>>> I am seeing). >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> - CentOS 6.x >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Capistrano" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To view this discussion on the web, visit >>>>>> https://groups.google.com/d/msgid/capistrano/3be2949c-e9c4- >>>>>> 4a94-88d4-aaa13c500589%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/capistrano/3be2949c-e9c4-4a94-88d4-aaa13c500589%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>> Yes - I am still unable to get the deploys to work properly. Do you >>>> have any recommendations? I'm fine with RTFM, but hadn't found the manual >>>> yet to read so would appreciates links to the manual if you have them ;) >>>> >>>> Thank you, >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Capistrano" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web, visit >>>> https://groups.google.com/d/msgid/capistrano/6ee22808-01d9- >>>> 4c3b-b9e5-e8b94ce8077a%40googlegroups.com >>>> <https://groups.google.com/d/msgid/capistrano/6ee22808-01d9-4c3b-b9e5-e8b94ce8077a%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web, visit https://groups.google.com/d/ > msgid/capistrano/7390c6dc-bb76-4ae1-937c-cdba6f76ad04%40googlegroups.com > <https://groups.google.com/d/msgid/capistrano/7390c6dc-bb76-4ae1-937c-cdba6f76ad04%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLWDECrtSVtE5UWKuwcxcm4PLGrAdTKh1ZvbS13Oae%2B3MQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
