我运行命令
heroku create --stack cedar
git push heroku master
Run Code Online (Sandbox Code Playgroud)
但它给了我一个错误:
> Counting objects: 144, done. Delta compression using up to 2 threads.
> Compressing objects: 100% (128/128), done. Writing objects: 100%
> (144/144), 50.16 KiB, done. Total 144 (delta 23), reused 0 (delta 0)
>
> -----> Heroku receiving push
> -----> Ruby/Rails app detected
> -----> Installing dependencies using Bundler version 1.1.rc
> Running: bundle install --without development:test --path vendor/bundle --deployment
> Fetching gem metadata from http://rubygems.org/.......
> Installing …Run Code Online (Sandbox Code Playgroud) 当我尝试将我的Rails 3应用程序部署到Heroku并且在gems文件中定义了sqlite3时,我遇到了Heroku部署问题中描述的相同场景.
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in`requirement':没有要加载的文件--sqlite3(LoadError)
任何线索为什么会这样?在ruby-forum中定义的解决方案有效,我只是想知道为什么.
我试图将我的rails应用程序推送到heroku并收到如下错误:
-
Counting objects: 177, done. Delta compression using up to 2 threads.
Compressing objects: 100% (161/161), done. Writing objects: 100%
(177/177), 44.73 KiB, done. Total 177 (delta 39), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.1
Running: bundle install --without development:test --path vendor/bundle -
-binstubs bin/
Fetching gem metadata from
Fetching gem metadata from
Installing rake (10.0.2)
Installing i18n (0.6.1)
Installing multi_json (1.3.7)
Installing activesupport (3.2.8)
Installing builder …Run Code Online (Sandbox Code Playgroud) 我在同一个主题(这里是一个)上发现了一些帖子,并认为我做了正确的更改,但我仍然无法解决问题.
完成捆绑安装后,我推送到heroku,当它到达sqlite3安装时出现以下错误.
Installing sqlite3 (1.3.5) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may …Run Code Online (Sandbox Code Playgroud) 我正在关注在线铁路教程
一切都很好但是在尝试将主目录推送到heroku时.当它出现时:
Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.0
install everything but sqlite3, here it output:
Installing sqlite3 (0.1.1) /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:164:in `install': sqlite3 requires Ruby version >= 1.9.1. (Gem::InstallError)
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:100:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:55:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/cli.rb:217:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/bin/bundle:13
from /usr/ruby1.8.7/bin/bundle:19:in `load'
from /usr/ruby1.8.7/bin/bundle:19
FAILED:
! Heroku push rejected, failed …Run Code Online (Sandbox Code Playgroud) 我将我的应用程序推送到heroku有问题.它说我必须安装sqlite3,但我已经安装了sqlite!我正在使用OSX Mountain Lion
>> sudo gem install sqlite3
Building native extensions. This could take a while...
Successfully installed sqlite3-1.3.7
1 gem installed
>> git push heroku master
Counting objects: 115, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (99/99), done.
Writing objects: 100% (115/115), 33.62 KiB, done.
Total 115 (delta 12), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.0.pre.5
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching …Run Code Online (Sandbox Code Playgroud)