简体   繁体   中英

Rails & Capistrano - Deployment gem issues

I've frozen my gems locally, and commit them in latest git version. I pushed this to my production server, and my capfile automatically pulls this when deploying (via locally stored git).

Now the issue I run into is that even though I know the server has the gem installed, when I deploy using "cap deploy:cold", I get the following error:

*** [err :: domain.com] Missing these required gems:
*** [err :: domain.com] RedCloth
*** [err :: domain.com] 
*** [err :: domain.com] You're running:
*** [err :: domain.com] ruby 1.8.7.174 at /usr/bin/ruby1.8
*** [err :: domain.com] rubygems 1.3.5 at /home/user/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
*** [err :: domain.com] 
*** [err :: domain.com] Run `rake gems:install` to install the missing gems.

Should I run rake gems:install in the latest release? When I do this nothing happens. Am I supposed to do rake gems:build somewhere; in my capfile? I do this in the latest release via console and in that directory and I do not get notices that anything was built, but I probably don't understand that function to begin with.

What am I missing?

Note. When I run gem list, I do see the gem install on the production server.

Because you say gem list includes RedCloth, the problem should be elsewhere.

How do you include the Gem in your application? RedCloth is a bit unconventional. The name of the gem is CamelCase while the main file is lowercase.

For this reason, you should specify the :lib option.

config.gem "RedCloth", :lib => "redcloth"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM