我的ror应用程序在rails 2.3.5上运行(需要机架1.0.1), heroku上的thin默认激活机架1.1.0
并抛出错误:
" You have already activated rack 1.1.0, but your Gemfile requires rack 1.0.1. Consider using bundle exec."
my Gemfile:
source 'http://rubygems.org'
group :test, :development do
gem "rack","1.0.1"
end
gem "rails","2.3.5"
gem "mysql"
gem "rake", "0.8.3"
gem "declarative_authorization", "0.5.2"
gem "searchlogic"
gem "prawn", "0.6.3"
gem "thin","1.2.11"
group :test, :development do
gem "rack","1.0.1"
end
group :development do
# bundler requires these gems in development
# gem "rails-footnotes"
end
group :test do
# bundler requires these gems while running tests
# gem "rspec"
# gem "faker"
end
----------------------
我安装了bundler并开发了Gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
actionmailer (2.3.5)
actionpack (= 2.3.5)
actionpack (2.3.5)
activesupport (= 2.3.5)
rack (~> 1.0.0)
activerecord (2.3.5)
activesupport (= 2.3.5)
activeresource (2.3.5)
activesupport (= 2.3.5)
activesupport (2.3.5)
daemons (1.1.4)
declarative_authorization (0.5.2)
eventmachine (0.12.10)
mysql (2.8.1)
prawn (0.6.3)
prawn-core (>= 0.6.3, < 0.7)
prawn-format (>= 0.2.3, < 0.3)
prawn-layout (>= 0.3.2, < 0.4)
prawn-security (>= 0.1.1, < 0.2)
prawn-core (0.6.3)
prawn-format (0.2.3)
prawn-core
prawn-layout (0.3.2)
prawn-security (0.1.1)
rack (1.0.1)
rails (2.3.5)
actionmailer (= 2.3.5)
actionpack (= 2.3.5)
activerecord (= 2.3.5)
activeresource (= 2.3.5)
activesupport (= 2.3.5)
rake (>= 0.8.3)
rake (0.8.3)
searchlogic (2.4.28)
activerecord (>= 2.0.0)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
PLATFORMS
ruby
DEPENDENCIES
declarative_authorization (= 0.5.2)
mysql
prawn (= 0.6.3)
rack (= 1.0.1)
rails (= 2.3.5)
rake (= 0.8.3)
searchlogic
thin (= 1.2.11)
---------------------------
请帮我在heroku上部署它........
答案 0 :(得分:0)
解决了......
我的应用使用机架1.0.1,导轨2.3.5
和heroku默认激活rake 1.1.0 ..
所以我将rails应用程序版本切换到2.3.11,它在environment.rb中使用了机架1.1.2并创建了一个Gem文件, 安装捆绑器
在我的笔记本电脑上测试...
生成锁定文件并将其推送到heroku ...
终于工作了......
花了一周时间让我的应用运行起来......
:)