-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with rvm on local tasks with different gemsets #52
Comments
Hi I will try to look into it before the end of week, in this time you can check out http://niczsoft.com/2015/02/changes-in-my-open-source-life/ |
Hi, did you link to the right article? |
yes it's right, a little background why you have to wait |
Ah right, yeah I'm fine with waiting. In the meantime I have been compiling manually and using the scp utilitiy in capistrano. I tried installing the capistrano gem into the same gemset as the projects compass etc, but that caused another error. |
@MichaelMallett By default RVM integrates with Bundler with the help of the rubygems-bundler gem. This handily automatically prefixes It seems that here you don't actually want to be running in the context of the bundle, since Compass is not in the Gemfile file. You can explicitly disable rubygems-bundler's automatic |
Hi, thanks for the response, but I think you may be misunderstanding me, our compass is in a gemfile. We have a standard drupal theme, inside that is a gemfile, and we have that bundle installed to a project specific ruby gem with rvm. There's a lot of these projects with different requirements so Outside of the root directory of the site (but inside the project) we have the deploy folder containing the capistrano script, the gemfile (and lock) containing the capistrano gem. This is installed to a gemset too, we don't want to install Capistrano 30 times on each machine into different gemsets, so this is in it's own 'deploy' gem using ruby 2.1.5. I tried adding capistrano into the theme gemfile and bundle installing again to bring them all together, but that caused other issues...and that's not really a viable solution to all our older projects. Problem is that the projects theme uses a different gemset and ruby version to capistrano in order to compile sass, because surely that's the whole point of rvm. So when capistrano calls rvm 1.9.3@omega do compass compile in the sites theme folder, it is not actually using the correct ruby version or gemset. You can see that from the path in error message Gemfile in the theme folder ([root]/sites/all/themes/omega/Gemfile using 1.9.3@omega) source 'https://rubygems.org' group :development do Sass, Compass and extensions.gem 'sass' # Sass. Guardgem 'guard' # Guard event handler. Dependency to prevent polling. Setup for multiple OS environments.Optionally remove the lines not specific to your OS.https://github.com/guard/guard#efficient-filesystem-handlinggem 'rb-inotify', '~> 0.9', :require => false # Linux end Gemfile in the deploy folder ([root]/deploy/Gemfile using 2.1.5@deploy) |
It seems that the |
Is there any way of avoiding this? |
check rubygems/bundler#1133 |
Is that the right issue? I don't see how they are related. Also, I am using bundler 1.7.12 and apparently whatever issue this is was fixed in 1.1 |
Hi, I'm not sure if this is something that can be helped here, as I am not using this gem - but I will if it turns out that it can do what I hope to do. I don't want to install or use ruby or rvm on production, I'm looking to run rvm locally in capistrano, so I can compile sass locally and copy to production. Below is my, expanded, question I posted in the capistrano issue queue, but was directed here. Thanks in advance
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 my projects already defined rvm gemset, using capistrano (which was installed using it's own gemset), and then upload the compiled css to the production server. I would assume that capistrano wouldn't force you to fix to a ruby version and gemset as these are all different across projects, or would it?
Anyway, I am trying to get capistrano working with a drupal site, specifically with the gemsets that the project was set up with long ago.
So, 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. The following commands were used to install compass capistrano:
I am running this task in my deploy.rb, after publishing
Which outputs this command
Which 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
Which suggests it is not using the right ruby version/gemset...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.
I 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. I didn't use this gem as it seemed to be more about running rvm remotely, which I am not looking to do.
The text was updated successfully, but these errors were encountered: