2017-08-12 64 views
0

我使用的是Ruby 2.2.7和Rails 3.2.21,并试图在Heroku上部署版本为:~> 2.5.7的gem:locomotive_cms,并且它被部署成功,但我面临着以下错误:“捆绑器:未能加载命令:瘦”在Heroku

2017-08-12T23:33:13.732440+00:00 app[web.1]: bundler: failed to load command: thin (/app/vendor/bundle/ruby/2.2.0/bin/thin) 2017-08-12T23:33:13.732490+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/excon-0.23.0/lib/excon/middlewares/expects.rb:6:in `response_call'

有了这样的,它会产生这样太:

Heroku::API::Errors::ErrorWithResponse: Expected(200) <=> Actual(400 Bad Request)

我有thin在我的Gemfile根据其文档所必需的locomotivecms。

我也一直在其他类似的问题,但我仍然无法解决我的问题。我有红宝石版本:2.2.7,虽然它是说:/app/vendor/bundle/ruby/2.2.0/bin/thin

的Gemfile:

source 'https://rubygems.org' 
ruby "2.2.7" 

gem 'rails', '3.2.21' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 
gem 'locomotive_cms', '~> 2.5.7', :require => 'locomotive/engine' 
gem 'dotenv-rails' 

gem 'savon', '~> 2.3.0' # SOAP client for pulling in events 
gem 'twitter', '5.8.0' 
gem 'twitter-text' 
gem 'whenever', require: false 


# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'compass-rails', '~> 2.0.0' 
    gem 'sass-rails', '~> 3.2.4' 
    gem 'coffee-rails', '~> 3.2.2' 

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
    gem 'therubyracer', :platforms => :ruby 

    gem 'uglifier', '~> 1.2.4' 
end 

group :development do 
    gem 'unicorn' 
    gem 'pry' 
end 


# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'debugger' 

# To use on Heorku 
gem 'locomotive-heroku', '~> 0.1.0', :require => 'locomotive/heroku' 
gem 'thin' 

Gemfile.lock的:

你可以在这里找到:https://gist.github.com/Arslan-Ali-Butt/640c1ec1750d17c9803e12a492f35c4e

+0

只是一个供参考 - 你要如果你正在使用的轨道运行到所有类型的问题3.x.x和Ruby 2.2.x中使用支持rails 4.x的CMS。 – zee

+0

你的Gemfile还有什么? Gemfile.lock中有什么? –

+0

@AaronBreckenridge我已经更新了我的Gemfile中的问题,以及临客,以Gemfile.lock的 –

回答

3

对不起,坏消息。

我看了一下你的Gemfile和Gemfile.lock,以及​​和locomotive_cms的最新的2.5.x分支https://github.com/locomotivecms/engine/tree/v2.5.x。由于缺乏对您所依赖的Gems版本的维护,您已经达到了功能的终点。

locomotive_cms已更名为locomotivecms并且碰到了版本3+。该locomotive_cms宝石不再维护。不仅如此,它还不再与你使用的其他一些依赖关系兼容,即excon。

Bundler could not find compatible versions for gem "excon": 
    In Gemfile: 
    locomotive_cms was resolved to 2.5.8, which depends on 
     fog (~> 1.12.1) was resolved to 1.12.1, which depends on 
     excon (~> 0.23.0) 

    locomotive-heroku was resolved to 0.1.0, which depends on 
     heroku-api (~> 0.3.23) was resolved to 0.3.23, which depends on 
     excon (~> 0.44) 

你会想在https://locomotive-v3.readme.io/docs/upgrade-to-v3要经过升级指南。

+0

是的,我已经与Heorku团队联系过,事实上这是理由。 'locomotive_cms'与最新版本的Heroku API不兼容。 –

0

添加Procfile(将一个名为Procfile的文件放在你的应用程序的根目录下),以告诉Heroku使用瘦,像这样:

web: bundle exec thin start -p $PORT 

这将允许您在Heroku的生产中运行瘦身。我假设你的Gemfile配置正确

第二条消息指向根据Heroku API guide的错误请求,但很难判断它是如何连接到第一条错误消息的。

+0

一个Procfile已经存在与内容:'网站:捆绑高管薄开始-p薄是$ PORT -e $ RACK_ENV' –

+0

什么版本你在用吗? –

+0

它是'1.7.2'。虽然我没有特别在我的Gem文件中提到它。 –