在Heroku上运行rails 3.2 / mongoid应用程序失败 [英] running rails 3.2 / mongoid app on heroku fails

查看:97
本文介绍了在Heroku上运行rails 3.2 / mongoid应用程序失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用以下Gemfile设置了我的Rails 3.2应用程序

  source'https://rubygems.org'

gem'rails','3.2.0'

#Bundle edge Rails改为:
#gem'rails',:git => 'git://github.com/rails/rails.git'

gem'sqlite3-ruby',:require => 'sqlite3'
gem'mongoid'
gem'bson_ext'
gem'mongoid_slug'
gem'heroku'


#使用宝石仅用于资产,默认情况下不需要生产环境中的
#。
group:assets do
gem'sass-rails','〜> 3.2.3'
gem'咖啡栏','〜> 3.2.1'
gemcompass,> = 0.12.alpha

#请参阅https://github.com/sstephenson/execjs#readme了解更多支持的运行时间
#gem'therubyracer'

gem'uglifier','> = 1.0.3'
结束

gem'jquery-rails'

我已经运行了 rails g mongoid:config 命令



从heroku支持中,我添加了mongolab扩展,并将mongoid.yml evironnement变量更改为 MONGOLAB_URI



当我部署应用程序时,它不会在heroku上运行。



我不确定发生了什么,但是我在Heroku日志中看到这个错误信息:

 警告:'/ app中的无效.gemspec格式/.bundle/gems/ruby/1.9.1/specifications/actionmailer-3.2.0.gemspec'
2012-01-29T19:13:46 + 00:00 app [web.1]:找不到activemodel -3.2.0任何来源

这里是完整的日志文件:



https://gist.github.com/1700231

有没有人遇到同样的问题?我不知道是否问题来自于我的设置,或者如果我需要添加某些东西到rails以使用mongoid?



干杯。

解决方案

b * tt有点痛苦,但我终于到了。



http://railsapps.github.com/rails-heroku-tutorial.html

是在heroku上运行deplay rails 3.2的好地方。

这就是我的头当想要学习时遇到如此多的障碍并不是太有趣。
Octopress现在看起来很好,我告诉你:)

好吧,让我们继续前进


I'd like to now if anybody could help me with my heroku deployement.

I've set up my Rails 3.2 app with the following Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.0'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'mongoid'
gem 'bson_ext'
gem 'mongoid_slug'
gem 'heroku'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem "compass", ">= 0.12.alpha"

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer'

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

And I have run the rails g mongoid:config command

From the heroku support, I've added the mongolab extension and changed the mongoid.yml evironnement variables to MONGOLAB_URI

When I then deploy the app, it doesn't run on heroku.

I'm not sure what is going on, but i get this error message in the Heroku logs:

WARNING:  Invalid .gemspec format in '/app/.bundle/gems/ruby/1.9.1/specifications/actionmailer-3.2.0.gemspec'
2012-01-29T19:13:46+00:00 app[web.1]: Could not find activemodel-3.2.0 in any of the sources

here is the full log file:

https://gist.github.com/1700231

has anybody experienced the same issue? I'm not sure if the problem comes from my set up or if I need to add something to rails to work with mongoid?

Cheers.

解决方案

It's been a bit of pain int the b*tt, but I'm finally there.

http://railsapps.github.com/rails-heroku-tutorial.html

is the right place to go to deplay rails 3.2 on heroku.

This said my head hurt, not too much fun to get so many hurdles when one wants to learn. Octopress looks fine at the moment I tell you :)

Alright let's keep going

这篇关于在Heroku上运行rails 3.2 / mongoid应用程序失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆