Not sure what my problem is - seemingly getting gems installed on a prod server!
I'm very new to rails and attempting to deploy some changes to my production server. In particular, I froze up my gems and have them all ready to go in my vendor/gems/ directory. I have also updated my config/environment.rb file to reflect the proper :lib and :source. When I try to push my content to my production server (via a SVN controlled server and capistrano), I'm getting errors.
*** [err :: leftright.us] Missing these required gems:
*** [err :: leftright.us] feedzirra
....
*** [err :: leftright.us] Run `rake gems:install` to install the missing gems.
So, I try to run rake gems:install on the server, like so:
rake gems:install RAILS_ENV=production
which doesn't really do much. It doesn't error out, but it just produces a new prompt. I tried t开发者_Go百科o manually install a gem on the server, but I think that defeats the purpose of having them packed into the project.
I'm concerned that it isn't installing all the proper gems because they haven't been deployed to the server... Can anyone help? I'm totally lost. Thanks!
//********** UPDATE *************//
ok... I'm getting a bit further. I have followed the instructions at those links, and am seeing this:
$ gem list
*** LOCAL GEMS ***
curb (0.7.7.1)
fastthread (1.0.7)
feedzirra (0.0.23)
...
nokogiri (1.4.2)
...
sax-machine (0.0.15)
taf2-curb (0.5.4.0
but i'm still getting the same errors on deploy... Ideas
you can only package gems that are non-native. There are some things you can do with bundler, but I won't get into that. Checking on the gem, it appears that it has at least one native dependency that I know of - nokogiri. I recommend installing this on the server with:
> sudo gem install feedzirra
This will try to install the gem and all dependencies. You will likely get some dependency errors. Nokogiri requires the libxml2 and libxslt. This tutorial will help you get it installed depending on what kind of server you are deploying to:
http://nokogiri.org/tutorials/installing_nokogiri.html
There are some other dependencies reading up on feedzirra, there are some instructions at http://github.com/pauldix/feedzirra on how to resolve issues with the taf2-curb gem (at least on ubuntu).
I hope this helps! Deploys can be a bear sometimes.
精彩评论