Version 2.15 and 3

48 views
Skip to first unread message

Björn Etzold

unread,
Mar 26, 2014, 6:56:44 AM3/26/14
to capis...@googlegroups.com
Hi,

i'm pretty new with capistrano and ruby.

I use capistrano to deploy my projects. No i have the situation, that i'm using capistrano 3.1 and everything works fine. But i need to use for an other project capistrano 2.15. How can i do that?

Why do i want to do that? Because i use the gem magentify and this one is not compatible to 3.1

Thanks for the help

I work with Mac OS x. 

Lee Hambley

unread,
Mar 26, 2014, 7:01:08 AM3/26/14
to capistrano
Add a Gemfile to each project!.

--
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 capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/302dce78-9657-4b77-937b-e1de8711b1da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Björn Etzold

unread,
Mar 26, 2014, 7:09:04 AM3/26/14
to capis...@googlegroups.com
I did that, but when i use then "cap" it is still using version 3.1 or do i have to use then an other bash?

Lee Hambley

unread,
Mar 26, 2014, 9:12:46 AM3/26/14
to capistrano
$ bundle exec <anything in a Gemfile>

Bundler is kinda depending a bit which Ruby, Rubygems, etc you have installed, but savest bet, if there's a Gemfile you should be typing "bundle exec <my thing provided by a gem>"

Jonathan Rochkind

unread,
Mar 26, 2014, 9:13:15 AM3/26/14
to capis...@googlegroups.com
Running `bundle exec cap` instead of just `cap` will make sure the cap
executable and all other dependencies used are as specified in your
Gemfile/Gemfile.lock.

On 3/26/14 7:09 AM, Björn Etzold wrote:
> I did that, but when i use then "cap" it is still using version 3.1 or
> do i have to use then an other bash?
>
> On Wednesday, March 26, 2014 12:01:08 PM UTC+1, Lee Hambley wrote:
>
> Add a Gemfile <http://bundler.io/>to each project!.
>
> Lee Hambley
> --
> http://lee.hambley.name/
> +49 (0) 170 298 5667
>
>
> On 26 March 2014 11:56, Björn Etzold <bjoern...@gmail.com
> <javascript:>> wrote:
>
> Hi,
>
> i'm pretty new with capistrano and ruby.
>
> I use capistrano to deploy my projects. No i have the situation,
> that i'm using capistrano 3.1 and everything works fine. But i
> need to use for an other project capistrano 2.15. How can i do that?
>
> Why do i want to do that? Because i use the gem magentify and
> this one is not compatible to 3.1
>
> Thanks for the help
>
> I work with Mac OS 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 capistrano+...@googlegroups.com <javascript:>.
> <https://groups.google.com/d/msgid/capistrano/302dce78-9657-4b77-937b-e1de8711b1da%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <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 capistrano+...@googlegroups.com
> <mailto:capistrano+...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/ca6f0db8-abfd-4b3d-a846-a66e3f5160e5%40googlegroups.com
> <https://groups.google.com/d/msgid/capistrano/ca6f0db8-abfd-4b3d-a846-a66e3f5160e5%40googlegroups.com?utm_medium=email&utm_source=footer>.

Hassan Schroeder

unread,
Mar 26, 2014, 11:15:47 AM3/26/14
to capis...@googlegroups.com
On Wed, Mar 26, 2014 at 4:09 AM, Björn Etzold <bjoern...@gmail.com> wrote:
> I did that, but when i use then "cap" it is still using version 3.1 or do i
> have to use then an other bash?

Besides the Gemfile + `bundle exec` approach already mentioned,
using rvm (https://rvm.io/) enables you to have multiple "gemsets"
as well as multiple rubies, and is excellent for dealing with projects
with differing requirements.

FWIW,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Graham Carey

unread,
Mar 27, 2014, 7:45:04 PM3/27/14
to capis...@googlegroups.com
Using bundle --binstubs is also a really good way to use project specific files.

Here's an article expaining how to set it up with rvm:

Once this is done, you can run the executable from the project dir like:
$ ./bin/capify  # (for v2 capistrano)
$ ./bin/cap install # (for v3 capistrano)

All other executables (rails, rake, etc) will also be stored in the bin dir, so instead of running
$ bundle exec <some command>

you can run

$ ./bin/<some command>

Regards,
Graham
Reply all
Reply to author
Forward
0 new messages