- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
其他人之前也问过类似的问题,但没有人使用过cloud9 IDE。我已经尝试过其他问题的解决方案,但仍然无法使其发挥作用。
我正在学习 Michael Hartl Ruby on Rails 教程(第 3 版)并使用 cloud9 IDE(当我运行 Windows 操作系统时)。
当我尝试将主分支从 Bitbucket 推送到 Heroku 时。
$ git push heroku master
我收到错误:
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue.
我很高兴 Heroku 不支持 sqlite。但我非常仔细地遵循了教程。我看不出我哪里出了问题。
完整代码如下:
kpscowley:~/workspace/hello_app2 (master) $ git push heroku master
Counting objects: 66, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 16.75 KiB | 0 bytes/s, done.
Total 66 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using bundler 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Rubygems 2.0.14.1 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Installing rake 10.4.2
remote: Installing i18n 0.7.0
remote: Installing json 1.8.3
remote: Installing minitest 5.8.3
remote: Installing thread_safe 0.3.5
remote: Installing tzinfo 1.2.2
remote: Installing activesupport 4.2.2
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing nokogiri 1.6.7.1
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing rails-dom-testing 1.0.7
remote: Installing loofah 2.0.3
remote: Installing rails-html-sanitizer 1.0.2
remote: Installing actionview 4.2.2
remote: Installing rack 1.6.4
remote: Installing rack-test 0.6.3
remote: Installing actionpack 4.2.2
remote: Installing globalid 0.3.6
remote: Installing activejob 4.2.2
remote: Installing mime-types 2.99
remote: Installing mail 2.6.3
remote: Installing actionmailer 4.2.2
remote: Installing activemodel 4.2.2
remote: Installing arel 6.0.3
remote: Installing activerecord 4.2.2
remote: Installing coffee-script-source 1.10.0
remote: Installing execjs 2.6.0
remote: Installing coffee-script 2.4.1
remote: Installing thor 0.19.1
remote: Installing railties 4.2.2
remote: Installing coffee-rails 4.1.1
remote: Installing concurrent-ruby 1.0.0
remote: Installing multi_json 1.11.2
remote: Installing jbuilder 2.3.2
remote: Installing jquery-rails 4.0.5
remote: Using bundler 1.9.7
remote: Installing sprockets 3.5.2
remote: Installing sprockets-rails 3.0.0
remote: Installing rails 4.2.2
remote: Installing rdoc 4.2.1
remote: Installing sass 3.4.20
remote: Installing tilt 2.0.1
remote: Installing sass-rails 5.0.4
remote: Installing sdoc 0.4.1
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/ruby-2.0.0/bin/ruby extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/ruby-2.0.0/bin/ruby
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/
remote: Gem files will remain installed in /tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11/ext/sqlite3/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Rubygems 2.0.14.1 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Installing rake 10.4.2
remote: Installing i18n 0.7.0
remote: Installing json 1.8.3
remote: Installing minitest 5.8.3
remote: Installing thread_safe 0.3.5
remote: Installing tzinfo 1.2.2
remote: Installing activesupport 4.2.2
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing nokogiri 1.6.7.1
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing rails-dom-testing 1.0.7
remote: Installing loofah 2.0.3
remote: Installing rails-html-sanitizer 1.0.2
remote: Installing actionview 4.2.2
remote: Installing rack 1.6.4
remote: Installing rack-test 0.6.3
remote: Installing actionpack 4.2.2
remote: Installing globalid 0.3.6
remote: Installing activejob 4.2.2
remote: Installing mime-types 2.99
remote: Installing mail 2.6.3
remote: Installing actionmailer 4.2.2
remote: Installing activemodel 4.2.2
remote: Installing arel 6.0.3
remote: Installing activerecord 4.2.2
remote: Installing coffee-script-source 1.10.0
remote: Installing execjs 2.6.0
remote: Installing coffee-script 2.4.1
remote: Installing thor 0.19.1
remote: Installing railties 4.2.2
remote: Installing coffee-rails 4.1.1
remote: Installing concurrent-ruby 1.0.0
remote: Installing multi_json 1.11.2
remote: Installing jbuilder 2.3.2
remote: Installing jquery-rails 4.0.5
remote: Using bundler 1.9.7
remote: Installing sprockets 3.5.2
remote: Installing sprockets-rails 3.0.0
remote: Installing rails 4.2.2
remote: Installing rdoc 4.2.1
remote: Installing sass 3.4.20
remote: Installing tilt 2.0.1
remote: Installing sass-rails 5.0.4
remote: Installing sdoc 0.4.1
remote:
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/ruby-2.0.0/bin/ruby extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/ruby-2.0.0/bin/ruby
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/
remote:
remote:
remote: Gem files will remain installed in /tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_287067056d8f395e2b2b5684ca54eff3/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11/ext/sqlite3/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to powerful-reaches-4422.
remote:
To https://git.heroku.com/powerful-reaches-4422.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/powerful-reaches-4422.git'
另请参阅我的 Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.2'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
和 Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.2)
actionpack (= 4.2.2)
actionview (= 4.2.2)
activejob (= 4.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.2)
actionview (= 4.2.2)
activesupport (= 4.2.2)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.2)
activesupport (= 4.2.2)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.2)
activesupport (= 4.2.2)
globalid (>= 0.3.0)
activemodel (4.2.2)
activesupport (= 4.2.2)
builder (~> 3.1)
activerecord (4.2.2)
activemodel (= 4.2.2)
activesupport (= 4.2.2)
arel (~> 6.0)
activesupport (4.2.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (8.2.1)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.0)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.6.0)
globalid (0.3.6)
activesupport (>= 4.1.0)
i18n (0.7.0)
jbuilder (2.3.2)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.99)
mini_portile2 (2.0.0)
minitest (5.8.3)
multi_json (1.11.2)
nokogiri (1.6.7.1)
mini_portile2 (~> 2.0.0.rc2)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.2)
actionmailer (= 4.2.2)
actionpack (= 4.2.2)
actionview (= 4.2.2)
activejob (= 4.2.2)
activemodel (= 4.2.2)
activerecord (= 4.2.2)
activesupport (= 4.2.2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.2)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
railties (4.2.2)
actionpack (= 4.2.2)
activesupport (= 4.2.2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.1)
json (~> 1.4)
sass (3.4.20)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
spring (1.6.1)
sprockets (3.5.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.0.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
PLATFORMS
ruby
DEPENDENCIES
byebug
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
jquery-rails
rails (= 4.2.2)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)
任何帮助将不胜感激,谢谢。
最佳答案
Heroku 仅适用于 PostgreSQL。您可以继续在本地使用 sqlite3,但需要切换到 Heroku 上的 pg。
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
然后删除
`Gemfile.lock`
然后运行
bundle install --without production
在推送到 Heroku 之前,不要忘记将 Gemfile
和 Gemfile.lock
提交到本地 master。
关于ruby-on-rails - RoR Michael Hartl 教程(第三)- 安装 sqlite3 时出错,Bundler 无法继续,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34425969/
我正在按照 Hartl 的教程学习 Rails,并对它进行自己的调整。现在,我想扩展它并添加一个发送电子邮件的联系表单。本教程中不包含此类内容,但在第 10 章结束时,我们学会了使用邮件程序方法,并且
这是我在使用 bundle exec rspec spec/requests/static_pages_spec.rb 时遇到的错误。 我已经包含了 gem 测试单元。 请帮助我,我是 Rails 的
我在尝试实现 Hartl 的 Ruby on Rails 教程中的示例应用程序时遇到了一个奇怪的问题。 当我删除微博时,会发生以下情况: 微博被删除。 用户也会被删除。 定向至“注册”页面。 只应该发
我正在学习 Michael Hartl 的优秀 Rails 教程,并且我正在努力了解种子用户的一个方面。我刚刚完成第 9 章,所以我有一个具有管理员权限的工作登录/注销/编辑/删除系统。作为本章的一部
我将表单部分用于创建微博,如 Listing 10.33 所示与 并按照指示更新相应的 View 文件。但是,我无法通过 Rspec 测试,因为我不断收到“未定义的局部变量或类的方法'对象'...”有
我是 Rails 的新手,但我在 hartls 教程的第 11 章中一直遇到问题,目前是 给 Missing partial microposts/_micropost with {:locale=>
阅读 Hartl 的教程,地址为 list 10.42 在 microposts Controller 中,我们有 def create @micropost = current_user
我已经完成了本教程,但自第 7 节制作注册表单以来,我在 CSS 渲染方面遇到了一些小问题。这就是我得到的: 它应该是这样的: 这是相关的 CSS: @mixin box_sizing { -mo
我刚刚完成了 Hartl 教程的第 8 章,但当我尝试运行测试时,不断出现错误。我收到 3 个相同的错误,该问题似乎源于用户登录测试,其中在固定装置集中(用户)中未找到固定装置 :michael。 这
对于我的测试失败的任何帮助,我将不胜感激。我是根据 Michael Hartl 教程做的,我几乎尝试了所有方法并阅读了很多相关内容,但仍然一无所知。坦克斯 我的测试: 描述“分页”做 before(:
我刚刚完成了 Hartl 教程的第 10 章,但我的 CSS 没有加载到 Heroku 中。 我试过运行 $heroku run bundle exec rake assets:precompile
我正在研究 Michael Hartl 的 Ruby on Rails 教程,我在第 9 章遇到了错误。 错误: 1) Error: UsersIndexTest#test_index_as_ad
我是 RoR 的新手,一直在努力完成 Hartl教程(很棒)。我已经成功地跟进了第 9 章(稍微调整了一下,因为我的最终目标不是制作微博站点)。那时,我决定要在我的应用程序中添加一个“记住我”复选框并
我正在关注 Michael Hartl 教程并在 Listing 10.14 之后,他说 There is one subtlety, though: on failed micropost subm
我以前使用过 Rails 并安装了其他版本。我目前正在尝试遵循 Hartl 的教程,他要求使用特定版本的 Rails 和特定的 gem。 当我尝试运行 rails _5.0.3_ new sample
我一直在关注 Ruby-on-Rails tutorial 中的练习由 M. Hartl 着。我已经完成了第 4 章中的所有练习,但仍停留在这一章上: Create three hashes call
我似乎左右都遇到了失败...我检查了我的代码,一切都已定义并且拼写检查正在检查...这是我的失败...: Failures: 1) User pages index should list eac
我正在写关于我在完成 Michael Hartl 的 Ruby on Rails 教程时遇到的问题。问题是 css 不会更改用于密码确认的输入字段的外观。所有其他输入字段的外观都受 css 规则的影响
我正在编写 Michael Hartl 的教程。我在第 6 章。我要进行用户验证。下面的代码是我被告知要使用的代码,但它不起作用。我收到错误消息 syntax error, unexpected en
我一遍又一遍地检查代码,但我似乎找不到下拉菜单不起作用的原因。因此,我看不到下拉菜单中的链接是否正常工作。此外,标题现在切断了 。任何帮助是极大的赞赏。这是我的代码。 _header.html.erb
我是一名优秀的程序员,十分优秀!