0

I am using the gem Paperclip and now I wanted to deploy my app to the server using capistrano, but when run cap deploy I get the following message at the end:

 * executing "cd /home/administrator/myApp/releases/20120506165329 && bundle install --gemfile /home/administrat
or/myApp/releases/20120506165329/Gemfile --path /home/administrator/myApp/shared/bundle --deployment --qui
et --without development test"
    servers: ["myserver.com"]
    [myserver.com] executing command
 ** [out :: myserver.com] Gem::InstallError: paperclip requires Ruby version >= 1.9.2.
 ** [out :: myserver.com] An error occured while installing paperclip (3.0.3), and Bundler cannot continue.
 ** [out :: myserver.com] Make sure that `gem install paperclip -v '3.0.3'` succeeds before bundling.
    command finished in 66362ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/administrator/myApp/releases/20120506165329; true"
    servers: ["myserver.com"]
    [myserver.com] executing command
    command finished in 66ms
failed: "sh -c 'cd /home/administrator/myApp/releases/20120506165329 && bundle install --gemfile /home/administra
tor/myApp/releases/20120506165329/Gemfile --path /home/administrator/myApp/shared/bundle --deployment --qu
iet --without development test'" on myserver.com

I have checked the version of Ruby in my server and I got:

$ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

I have also intalled the gem manually in the server by running

gem install paperclip -v '3.0.3'
...
Successfully installed paperclip-3.0.3

and ran cap deploy again, but the same message showed up

how can I deploy my app?

thanks you in advance

marimaf
  • 5,382
  • 3
  • 50
  • 68

1 Answers1

0

It was fixed by setting de default environments of capistrano as suggested in the accepted answer here

I can now deploy with capistrano (although my system ruby is still using ruby 1.8.7 so the gem paperclip does not get installed properly, you can find this problem here)

Community
  • 1
  • 1
marimaf
  • 5,382
  • 3
  • 50
  • 68