Heroku 捆绑错误(Rails 应用程序) [英] Heroku Bundle Error (Rails App)

查看:47
本文介绍了Heroku 捆绑错误(Rails 应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Ruby on Rails 的新手,应用正在本地机器上运行

i'm new to Ruby on Rails, app is running on local machine

本地捆绑作品

然而,当我尝试 git push heroku master 时,这是我得到的错误:

however when i try to git push heroku master, this is the error i get:

remote: 
remote: -----> Ruby/Rails app detected
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using 
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
remote:        /usr/bin/env: ruby1.9.1: No such file or directory
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:  !     Heroku push rejected, failed to compile Ruby/rails app
remote: 

我的gemfile:

source 'http://rubygems.org'
ruby '1.9.3' 
gem 'rails', '4.0.0.beta1'

group :development, :test do
  gem 'sqlite3'
  gem 'rspec-rails'
end

group :assets do
  gem 'sass-rails',   '~> 4.0.0.beta1'
  gem 'coffee-rails', '~> 4.0.0.beta1'

  gem 'therubyracer', platforms: :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

gem 'turbolinks'
gem 'jbuilder', '~> 1.0.1'
group :test do
  gem 'capybara'
end

group :production do
  gem 'pg'
end

我错过了什么?提前致谢!

推荐答案

我遇到了类似的问题.问题是 Bundler 正在生成存根.Rails 4 应用程序不在应用程序的 bin/目录中存储存根.为了解决这个问题,您需要使用以下命令:

I had a similar problem. The issue is that Bundler is generating stubs. Rails 4 apps do not store stubs in the app's bin/ directory. In order to fix this problem you need to use the following commands:

$ bundle config --delete bin

然后您需要更新 bin 目录以使用新的 Rails 4 可执行文件

Then you need to update the bin directory to use the new Rails 4 executables

$ rake rails:update:bin

然后使用以下命令将新的 bin/目录添加到您的版本控制中:

Then add the new bin/ directory to your version control using:

$ git add bin

提交更改并将您的代码推送到 Heroku

Commit the changes and push your code to Heroku

这篇关于Heroku 捆绑错误(Rails 应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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