Hosting Help - Custom Jewelry at DreamHost

I am trying to deploy a RoR application using Passenger to my DreamHost hosting account, but I am having trouble getting it up and running.

My app requires two custom gems "amazon-ecs" and "nokogiri". As per the instructions on the DreamHost wiki ( http://wiki.dreamhost.com/Freezing_Gems ) I have frozen the vendor gems by encoding them in my config file (config.gem "nokogiri") and then using the gke: unpack rake to create them as a supplier.

Then I froze the rail stones using rake rails: freeze: gems and upload it to my subdomain.

The last seven lines of my backline are as follows:

0   /home/rclosner/demo.spubooks.com/vendor/rails/railties/lib/initializer.rb   336     in `abort'
1   /home/rclosner/demo.spubooks.com/vendor/rails/railties/lib/initializer.rb   336     in `check_gem_dependencies'
2   /home/rclosner/demo.spubooks.com/vendor/rails/railties/lib/initializer.rb   170     in `process'
3   /home/rclosner/demo.spubooks.com/vendor/rails/railties/lib/initializer.rb   113     in `send'
4   /home/rclosner/demo.spubooks.com/vendor/rails/railties/lib/initializer.rb   113     in `run'
5   ./config/environment.rb     9   
6   /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb     31  in `gem_original_require'
7   /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb     31  in `require'

      

My config file looks like this:

RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), 'boot')

Rails::Initializer.run do |config|
config.gem "nokogiri"
config.gem "amazon-ecs"
config.time_zone = 'UTC'
end

      

Did I miss the jewel step? Am I on the right track?

+2


source to share


4 answers


Any gem that has extensions of its own cannot be sold with your app, and there is a good bet that on DH, config.gem won't work either. You have to install your own rubygems and force the application to use it. I recommend taking a look at this:

http://railstips.org/2008/11/24/rubygems-yours-mine-and-ours



It has excellent instructions for setting up your environment to DH. I just had to do this last week after updating the server and it still applies.

+5


source


so / vendor / rails and / vendor / plugins / nokogiri and amazon-ec exist and look good to you? You can try again and this time specify the exact version of the gem in your config like this

config.gem "nokogiri", :version => "1.0"

      

or if the gem is on Github



config.gem "tenderlove-nokogiri", :version => "1.0", :lib => "nokogiri", :source => "http://gems.github.com"

      

Reverse doesn't look very useful, what's going on exactly? :-)

0


source


I got the same line back (on the Passenger error page) with an app I deployed recently. It turned out that it could not find one of the gems I was depending on (config.gem) ... even though the rake rake said it was there ([I] test-unit = 1.2.3 ).

Dreamhost support suggested that I try freezing / unpacking my gems. It probably would have worked (I had no problem finding any of my other gems that were frozen) but for some reason the gems: unpack rake didn't do anything for me, so I ended up just commenting out this config .gem since I didn't need this in production anyway and it worked!

So, if anyone else gets this error, it strongly indicates that one of your gems was not found. Try commenting out your config.gem lines, one at a time, until it starts working or gives another error?

0


source


I had an issue with DreamHost last week where my production Rails apps suddenly stopped working due to a lack of gems. I contacted support and here is their answer:

It looks like some changes were made to your server and most of the system rubigems weren't reinstalled as they should. I've manually installed the sqlite3 gem for you, but our admin who handles this will have to take a look at this to find out why they weren't installed. If you have a couple more that you don't see, I can look potentially setting them as a stop gap in average time.

Perhaps the same thing affects you. Try contacting support to find out.

0


source







All Articles