2013-04-01 62 views
16

遇到以下问题,尝试上传应用程序首次尝试上载应用程序首次出现问题,然后决定是否可以使用heroku修复它们我只是用一个自定义域与Heroku ......没有这不是一个测试应用程序“学习铁轨”的事情,我想部署用于我自己的业务内的实际应用程序,任何帮助将是伟大的,我已经搜索并没有看到这个问题的解决方案。heroku push被拒绝,未能编译Ruby/rails应用程序

确保'gem install sqlite3 -v 1.3.7'在捆绑之前成功。

Failed to install gems via Bundler 

Heroku push rejected, failed to compile Ruby/rails app 

To [email protected]:peaceful-chamber-6371.git 
[remote rejected] master -> master <pre-receive hook declined> 
error: failed to push some refs to '[email protected]:peaceful-chamber-6371.git 

宝石文件

source 'https://rubygems.org' 

gem 'rails', '3.2.12' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 
group :development, :test do 
gem 'sqlite3' 
end 
group :production do 
    gem 'pg' 
end 


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

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

    gem 'uglifier', '>= 1.0.3' 
    gem 'twitter-bootstrap-rails' 
end 

gem 'jquery-rails' 

# 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' 
+1

你尝试过这样的:http://railsapps.github.com/rails-heroku-tutorial.html – corroded

+0

试过了......现在我得到一个 检测到Ruby/NoLockfile应用程序 Herolu推送被拒绝,未能编译Ruby/nolockfile应用程序 –

回答

40

试试这个,

删除Gemfile.lock文件,然后执行bundle install,然后git addgit commitgit push

+1

甜蜜,所以工作...但现在我正在寻找的页面不存在,它假设被“部署”到... ...那有什么问题? –

+0

边注意:它显示我的自定义图标在“不存在的页面” 如果这里重要的是我的路线......它的基本原因是这只是一个页面,“来自展会/节日/家庭表演的日志引导等事件,而不是使用草稿纸“不知道我是否真的需要将其编译成更详细的内容,例如我仍在研究的其他一些应用程序,这些应用程序更深入。 BoothLeads :: Application.routes.draw确 资源:导致 –

+0

任何额外的帮助上述评论将不胜感激......这是我所有新的..更不用说所有的“dynos”和任何设置在heroku ..大声笑 –

4

看看Heroku写入控制台的所有输出 - 您的错误可能在某处。我碰到这个,发现预编译步骤失败了。这可以在本地以及运行:

rake assets:precompile 
1

虽然问题有一个公认的答案,但答案并没有帮助我, 我有同样的问题。以下为我工作,因此贡献。 Heroku不支持sqlite 3.在这种情况下,我在我的gemfile中有sqlite3 gem,你应该把它放在开发组中,并把postgres gem(heroku支持的)放到生产组中。

1)从项目文件夹中删除Gemfile.lock的文件()

2)在Gemfile中,除去gem sqlite3或类似sqlite3的宝石

3)而不是添加下列文件的末尾:

group :development, :test do gem 'sqlite3' end gem 'pg', group: :production

现在,在终端执行以下命令:

bundle install 
git add . 
git commit 
git push 
git push heroku master 

虽然这是一个愚蠢的错误,但花了我一点时间才意识到这一点。希望它能帮助别人。

0

Heroku的不喜欢的sqlite3,改变gem 'sqlite3'gem 'pg'

+0

只要Rack ENV知道区别,您仍然可以使用sqlite3进行开发,但是您需要pg进行heroku制作。 –

相关问题