我正在尝试将 Rails 应用程序推送到 AppFog 并且不断收到 301 错误。
它进入了 Staging,因此它显示在我的 AppFog 帐户中,但拒绝激活。尝试更新它成功,但有同样的问题,它不会激活并且只显示 404 错误。
这是消息文本:
$ af push RubyMongoGranny --runtime=ruby193
Would you like to deploy from the current directory? [Yn]:
Pushing application 'RubyMongoGranny'...
Creating Application: OK
Binding Service [ruby_mongo_granny]: OK
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (236K): OK
Push Status: OK
Staging Application 'RubyMongoGranny': ..........Error 310: Staging failed: 'Staging task failed:
Staging plugin failed: /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/gemfile_task.rb:325:in `log_and_raise_error': Error resolving Gemfile: Error parsing Gemfile: /tmp/d20130401-19438-h0d0st/Gemfile not found (RuntimeError)
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/gemfile_task.rb:50:in `specs'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/gemfile_task.rb:103:in `gem_info'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/gemfile_support.rb:86:in `gem_info'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/rails3/plugin.rb:188:in `rails_version'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/rails3/plugin.rb:199:in `precompile_assets'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/rails3/plugin.rb:85:in `block in stage_application'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/rails3/plugin.rb:76:in `chdir'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/rails3/plugin.rb:76:in `stage_application'
from /opt/cloudfoundry/vcap/stager/bin/run_plugin:19:in `<main>'
我的 gemfile 看起来像:
source 'https://rubygems.org'
gem 'rails'
gem 'mongo_mapper'
gem 'bson_ext'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'cloudfoundry-jquery-rails
==UPDATE== 将 config.server_static_assets = false 更改为
config.server_static_assets = true
并预编译我的资产?
bundle exec rake assets:precompile
但它仍然给我同样的错误。
改变了
gem 'jquery-rails'
至
gem 'cloudfoundry-jquery-rails'
仍然没有成功