{"action":"created","issue":{"url":"https://api.github.com/repos/capistrano/capistrano/issues/1359","labels_url":"https://api.github.com/repos/capistrano/capistrano/issues/1359/labels{/name}","comments_url":"https://api.github.com/repos/capistrano/capistrano/issues/1359/comments","events_url":"https://api.github.com/repos/capistrano/capistrano/issues/1359/events","html_url":"https://github.com/capistrano/capistrano/issues/1359","id":56584277,"number":1359,"title":"Using different gemsets with rvm for local tasks","user":{"login":"MichaelMallett","id":4590104,"avatar_url":"https://avatars.githubusercontent.com/u/4590104?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelMallett","html_url":"https://github.com/MichaelMallett","followers_url":"https://api.github.com/users/MichaelMallett/followers","following_url":"https://api.github.com/users/MichaelMallett/following{/other_user}","gists_url":"https://api.github.com/users/MichaelMallett/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelMallett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelMallett/subscriptions","organizations_url":"https://api.github.com/users/MichaelMallett/orgs","repos_url":"https://api.github.com/users/MichaelMallett/repos","events_url":"https://api.github.com/users/MichaelMallett/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelMallett/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-04T20:41:21Z","updated_at":"2015-02-04T21:53:34Z","closed_at":"2015-02-04T21:53:34Z","body":"I have come across a couple of sort of efforts to document this, and another that is out of date: I want to run compass compile through the projects already defined rvm gemset, using capistrano, and then upload the compiled css to the production server, which was installed using a different gemset. I would assume that capistrano wouldn't force you to fix to a ruby version and gemset as these are all different across projects, would it?\r\n\r\nAnyway, I am trying to get capistrano working with a drupal site, specifically with the gemsets that the project was set up with long ago. \r\n\r\nSo, we have a themes folder where we run rvm 1.9.3@omega do compass compile, and capistrano installed to 2.1.5@deploy a few folders above it.\r\n\r\nI am running this task:\r\n\r\ndesc \"Compile locally\"\r\n  task :compile_locally do\r\n    run_locally do\r\n      execute \"cd ../#{fetch(:theme_path)} && rvm 1.9.3@omega do compass compile\"\r\n    end\r\n  end\r\n\r\nWhich outputs this command\r\ncd ../docroot/sites/all/themes/omega && rvm 1.9.3@omega do compass compile\r\n\r\nWhich works fine from the command line, in the folder I run cap from...however I get this error message when I try and run cap production deploy\r\n\r\ncap aborted!\r\nSSHKit::Command::Failed: cd ../docroot/sites/all/themes/omega && rvm 1.9.3@omega do compass compile exit status: 256\r\ncd ../docroot/sites/all/themes/omega && rvm 1.9.3@omega do compass compile stdout: Nothing written\r\ncd ../docroot/sites/all/themes/omega && rvm 1.9.3@omega do compass compile stderr: /Users/MIchael/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.9/lib/bundler/rubygems_integration.rb:256:in `block in replace_gem': compass is not part of the bundle. Add it to Gemfile. (Gem::LoadError)\r\n\r\n\r\nWhich suggests it is not using the right ruby gem...which I can kind of understand as capistrano is using that version of ruby...however I'm a bit stuck how to get round it. I don't want to have to manually compile compass everytime.\r\n\r\nI should point out that I am very much learning capistrano, and ruby in general, so I am happy to take on board any ideas about how to go about this properly"},"comment":{"url":"https://api.github.com/repos/capistrano/capistrano/issues/comments/72947686","html_url":"https://github.com/capistrano/capistrano/issues/1359#issuecomment-72947686","issue_url":"https://api.github.com/repos/capistrano/capistrano/issues/1359","id":72947686,"user":{"login":"leehambley","id":18952,"avatar_url":"https://avatars.githubusercontent.com/u/18952?v=3","gravatar_id":"","url":"https://api.github.com/users/leehambley","html_url":"https://github.com/leehambley","followers_url":"https://api.github.com/users/leehambley/followers","following_url":"https://api.github.com/users/leehambley/following{/other_user}","gists_url":"https://api.github.com/users/leehambley/gists{/gist_id}","starred_url":"https://api.github.com/users/leehambley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leehambley/subscriptions","organizations_url":"https://api.github.com/users/leehambley/orgs","repos_url":"https://api.github.com/users/leehambley/repos","events_url":"https://api.github.com/users/leehambley/events{/privacy}","received_events_url":"https://api.github.com/users/leehambley/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T21:53:34Z","updated_at":"2015-02-04T21:53:34Z","body":"Also, since you're not benefitting from any of the Capistrano stuff here (by composing your one liner, `cd` and execute-this-thing line all yourself - try reading and experimenting with the following:\r\n\r\nhttp://capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/\r\n\r\nAlso, the problem is bundler, \"thingy is not part of the Gemfile\" is simply because something on your machine is effectively turning what you typed into \"bundle exec compass\"… which won't work in a directory where there's a Gemfile, and compass is not part of it.\r\n\r\nClosing this issue, after reading it a couple more times, it's certainly not a Capistrano issue, possibly something with bundler or rvm, but again almost certain;y not with our integrations with them, but check with the maintainers of `capistrano/bundler` and `capistrano/rvm`"}}