开发者

Ruby on Rails: Heroku: How do I get my gems installed?

开发者 https://www.devze.com 2023-01-27 14:01 出处:网络
this is my GemFile source :rubygems gem \'rails\', \'2.3.8\' gem \'authlogic\', \'2.1.6\' gem \'addresslogic\', \'1.2.1\'

this is my GemFile

source :rubygems
gem 'rails', '2.3.8'
gem 'authlogic', '2.1.6'
gem 'addresslogic', '1.2.1'
gem 'searchlogic', '2.4.19'
gem 'subdomain-fu', '0.5.4'

but, when I run the app on heroku, I get "App Crashed"

and the log says I only have rails installed, and I need the non-rails gems listed above.

What am I doing wrong?

output from heroku push

     % git push heroku master
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 860 bytes, done.
Total 6 (delta 3), reused 0 (delta 0)

-----> Heroku receiving push
-----> Rails app detected
-----> WARNING: Detected Rails is not declared in either .gems or Gemfile
       Scheduling the install of Rails 2.3.8.
       See http://docs.heroku.com/gems for details on specifying gems.

-----> Installing gem rails 2.3.8 from http://rubygems.org
       Successfully installed activesupport-2.3.8
       Successfully installed activerecord-2.3.8
       Successfully installed rack-1.1.0
       Successfully installed actionpack-2.3.8
       Successfully installed actionmailer-2.3.8
       Successfully installed activeresource-2.3.8
       Successfully installed rails-2.3.8
       7 gems installed

       Compiled slug size is 11.7MB
-----> Launching.... done
       http://%%%%%%%%%%%%%%%%%%%.heroku.com deployed to Heroku

To gi开发者_高级运维t@heroku.%%%%%%%%%%%%%%%%%%%.git
   3ac597d..b849480  master -> master

heroku log

==> dyno-3334279.log <==
Missing these required gems:
  authlogic  
  addresslogic  
  searchlogic  

You're running:
  ruby 1.8.7.253 at /usr/ruby1.8.7/bin/ruby
  rubygems 1.3.7 at /home/slugs/362612_b849480_24ac-7763f7d7-8c04-478b-ab13-af81efd3e8c2/mnt/.bundle/gems/ruby/1.8, /home/slugs/362612_b849480_24ac-7763f7d7-8c04-478b-ab13-af81efd3e8c2/mnt/.bundle/gems, /home/slugs/362612_b849480_24ac-7763f7d7-8c04-478b-ab13-af81efd3e8c2/mnt/.gems, /usr/ruby1.8.7/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

==> production.log <==
# Logfile created on Sun Nov 28 19:41:39 -0800 2010


If you have a file named Gemfile (in this exact case/spelling) in the root of your repository, Heroku will use this file to determine all the gems to install.

You mentioned that you have a GemFile - if that is the way the filename is cased in your repository, Heroku may not pick it up.


You should create a file called .gems in your application root. That file should contain a list of the gems you need and the syntax for defining the gem dependencies are like this:

rails --version 2.3.8
authlogic --version 2.1.6

etc...

0

精彩评论

暂无评论...
验证码 换一张
取 消