【发布时间】:2013-02-28 19:27:27
【问题描述】:
大脑转储,因为我在谷歌上搜索并在计算机上猛烈撞击我的头。任何帮助或线索将不胜感激!
我通过 rvm 管理我的 gem。
$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0]
$ rails -v
Rails 4.0.0.beta1
然后当我想从头开始创建一个全新的应用程序时
$ rails new brand_new_app
create
create README.rdoc
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ cd brand_new_app
然后我初始化一个 git repo,添加我刚刚创建的应用程序。然后我创建一个heroku实例
brand_new_app $ heroku create
Git remote heroku added
然后我尝试部署到 heroku,但它在活动支持 gem 上失败了。
brand_new_app $ git push heroku master
Counting objects: 62, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (50/50), done.
Writing objects: 100% (62/62), 20.54 KiB, done.
Total 62 (delta 2), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.0.3)
Installing i18n (0.6.4)
Installing minitest (4.6.2)
Installing multi_json (1.6.1)
Installing atomic (1.0.1)
Installing thread_safe (0.1.0)
Installing tzinfo (0.3.37)
Installing activesupport (4.0.0.beta1)
Gem::InstallError: activesupport requires Ruby version >= 1.9.3.
An error occurred while installing activesupport (4.0.0.beta1), and Bundler
cannot continue.
Make sure that `gem install activesupport -v '4.0.0.beta1'` succeeds before
bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
我已经内爆了 rvm(我知道为什么,主要是因为我很沮丧)并且我已经检查了所有可能的地方。我在没有任何特殊设置的情况下创建了 rails 应用程序,它只是一个正常的安装。如果有人有任何提示可以引导我走向正确的方向,请按我的方式发送!感谢您阅读本文!
【问题讨论】:
-
你确定你在正确的堆栈上执行吗?你必须使用雪松。我不确定 Heroku 工具中的默认值是那个堆栈还是旧的竹子堆栈。
-
您的 Gemfile 是什么样的?里面有
ruby行吗? -
@Srdjan 我做了仔细检查,它使用的是雪松,因为这是目前的默认设置。非常感谢您花时间看这个!
-
@Ari 我仔细检查了一遍,默认的 rails new 没有在 gemfile 中放置 ruby 版本。顺便说一句,我没有对应用程序中的任何文件进行任何修改,我所做的只是 rails new 命令。我也感谢您抽出时间来帮助我!非常感谢!
-
嘿,Ben,当您有时间时,您应该接受 Arjan 的回答,以便他获得积分。它对我有用并帮助了我。感谢发帖!
标签: ruby-on-rails ruby heroku ruby-on-rails-4 ruby-2.0