ruby-on-rails - Heroku Push- 几种解决方案都失败了

标签 ruby-on-rails ruby git heroku push

完全公开 - 我是编码新手。

最初当我尝试命令 $ git push heroku master - 我收到以下错误,“未初始化的常量设计”。

我将 gem devise(Gemfile) 从 (group :development, :test do) 移动到 (group :production do) 无济于事。我什至尝试将其移到前面提到的组之外。结果返回:无法将某些引用推送到“https://git.heroku.com” .

之后,我再次运行推送命令并收到此错误“FileNotFound:找不到类型为“application/javascript”的文件“bootstrap-sprockets”。我随后从您的 application.js 中删除了 bootstrap-sprockets。那也失败了。我将所有东西都移回了原来的位置并尝试再次 push ,结果又回来了:

Counting objects: 229, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (208/208), done.
Writing objects: 100% (229/229), 41.31 KiB | 0 bytes/s, done.
Total 229 (delta 66), 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 --deploymen
    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 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.7.0
remote:        Installing thread_safe 0.3.5
remote:        Installing tzinfo 1.2.2
remote:        Installing activesupport 4.2.1
remote:        Installing builder 3.2.2
remote:        Installing erubis 2.7.0
remote:        Installing mini_portile 0.6.2
remote:        Installing nokogiri 1.6.6.2
remote:        Installing rails-deprecated_sanitizer 1.0.3
remote:        Installing rails-dom-testing 1.0.6
remote:        Installing loofah 2.0.2
remote:        Installing rails-html-sanitizer 1.0.2
remote:        Installing actionview 4.2.1
remote:        Installing rack 1.6.1
remote:        Installing rack-test 0.6.3
remote:        Installing actionpack 4.2.1
remote:        Installing globalid 0.3.5
remote:        Installing activejob 4.2.1
remote:        Installing mime-types 2.6.1
remote:        Installing mail 2.6.3
remote:        Installing actionmailer 4.2.1
remote:        Installing activemodel 4.2.1
remote:        Installing arel 6.0.0
remote:        Installing activerecord 4.2.1
remote:        Installing bcrypt 3.1.10
remote:        Installing coffee-script-source 1.9.1.1
remote:        Installing execjs 2.5.2
remote:        Installing coffee-script 2.4.1
remote:        Installing thor 0.19.1
remote:        Installing railties 4.2.1
remote:        Installing coffee-rails 4.1.0
remote:        Installing orm_adapter 0.5.0
remote:        Installing responders 2.1.0
remote:        Installing warden 1.2.3
remote:        Installing devise 3.5.2
remote:        Installing multi_json 1.11.1
remote:        Installing jbuilder 2.2.16
remote:        Installing jquery-rails 4.0.3
remote:        Installing pg 0.17.1
remote:        Using bundler 1.9.7
remote:        Installing sprockets 3.2.0
remote:        Installing sprockets-rails 2.3.1
remote:        Installing rails 4.2.1
remote:        Installing rails_serve_static_assets 0.0.4
remote:        Installing rails_stdout_logging 0.0.4
remote:        Installing rails_12factor 0.0.2
remote:        Installing rdoc 4.2.0
remote:        Installing sass 3.4.14
remote:        Installing tilt 1.4.1
remote:        Installing sass-rails 5.0.3
remote:        Installing sdoc 0.4.1
remote:        Installing turbolinks 2.5.3
remote:        Installing uglifier 2.7.1
remote:        Bundle complete! 16 Gemfile dependencies, 56 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:        <= 1.8.6 : unsupported
remote:        = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:        = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= 1.9.2 : nothing to do! Yay!
remote:        Bundle completed (86.26s)
remote:        Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        Sprockets::FileNotFound: couldn't find file 'bootstrap' with type 'application/javascript'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/app/assets/javascripts/application.js:17
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/resolve.rb:64:in `resolve!'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/directive_processor.rb:399:in `resolve'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/directive_processor.rb:207:in `process_require_directive'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/directive_processor.rb:180:in `block in process_directives'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/directive_processor.rb:178:in `each'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/directive_processor.rb:178:in `process_directives'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/directive_processor.rb:83:in `_call'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/directive_processor.rb:68:in `call'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/bundle.rb:23:in `block in call'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/utils.rb:183:in `dfs'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/bundle.rb:24:in `call'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:63:in `find_asset'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:70:in `find_all_linked_assets'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:138:in `block in find'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:223:in `block in stat_tree'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:207:in `block in stat_directory'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `each'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `stat_directory'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:222:in `stat_tree'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `each'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `each'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `logical_paths'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:136:in `find'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:162:in `compile'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/rake/sprocketstask.rb:147:in `with_logger'
remote:        /tmp/build_b8ba7c7f8f9b9d6606dccf954e43d1c0/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy....
remote: 
remote: !       Push rejected to (app_name).
remote: 
To https://git.heroku.com/app_name.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/app_name.git'
_________________________________________________________________________

我已经尝试了几种解决方案。我想不明白。一切都在顺畅地进行着。知道我需要做什么来解决这个问题吗?顺便说一句,App_name 只是原始名称的替代品。

非常感谢任何帮助。提前致谢。

最佳答案

它似乎没有在生产环境中安装 bootstrap。确保你的 Gemfile 中正确包含了 bootstrap,而不仅仅是包含在开发中。

关于ruby-on-rails - Heroku Push- 几种解决方案都失败了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32874220/

相关文章:

ruby-on-rails - Rails Sunspot - 是否可以通过值检索刻面行?

ruby - gem 规范失败

ruby-on-rails - rails : how to send a string from controller to view?

git - AWS 在 EC2 实例启动时从代码提交中提取最新代码

git - 如何在未跟踪的目录上执行 'git status'?

git - 如何在分支中获取第 n 个 git 日志

ruby-on-rails - 如何进行多行匹配并将它们分配给哈希?

ruby-on-rails - 如何在 Rails 中选择字段值最低的记录

ruby-on-rails - #<ActionDispatch::Http::UploadedFile:0xa5741c0> 的未定义方法 `each'

ruby-on-rails - Ruby:CSV 解析器在我的数据中被双引号绊倒