2016-04-25 125 views
0

余米,同时从在Heroku github上部署我的应用程序收到此错误部署轨...得到错误,而应用在Heroku

生成日志 - >

-----> Ruby app detected 

-----> Compiling Ruby/Rails 

-----> Using Ruby version: ruby-2.2.0 

-----> Installing dependencies using bundler 1.11.2 

     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 

     Fetching gem metadata from https://rubygems.org/........... 

     Fetching version metadata from https://rubygems.org/... 

     Fetching dependency metadata from https://rubygems.org/.. 

     Installing json 1.8.3 with native extensions 

     Installing i18n 0.7.0 

     Installing rake 10.5.0 

     Installing minitest 5.8.3 

     Installing thread_safe 0.3.5 

     Installing builder 3.2.2 

     Installing erubis 2.7.0 

     Installing mini_portile2 2.0.0 

     Installing rack 1.6.4 

     Installing mime-types 2.99 

     Installing sass 3.4.21 

     Installing thor 0.19.1 

     Installing coffee-script-source 1.10.0 

     Installing formtastic_i18n 0.6.0 

     Using bundler 1.11.2 

     Installing arel 6.0.3 

     Installing execjs 2.6.0 

     Installing concurrent-ruby 1.0.0 

     Installing tilt 1.4.1 

     Installing bcrypt 3.1.7 with native extensions 

     Installing cancan 1.6.10 

     Installing orm_adapter 0.5.0 

     Installing multi_json 1.11.2 

     Installing request_store 1.3.0 

     Installing puma 2.16.0 with native extensions 

     Installing rails_serve_static_assets 0.0.4 

     Installing rails_stdout_logging 0.0.4 

     Installing tzinfo 1.2.2 

     Installing rack-test 0.6.3 

     Installing nokogiri 1.6.7.1 with native extensions 

     Installing warden 1.2.6 

     Installing rdoc 4.2.1 

     Installing mail 2.6.3 

     Installing bourbon 4.2.7 

     Installing coffee-script 2.4.1 

     Installing uglifier 2.5.3 

     Installing autoprefixer-rails 6.3.1 

     Installing sprockets 3.5.2 

     Installing rails_12factor 0.0.2 

     Installing sdoc 0.4.0 

     Installing activesupport 4.2.2 

     Installing bootstrap-sass 3.3.6 

     Installing rails-deprecated_sanitizer 1.0.3 

     Installing globalid 0.3.6 

     Installing arbre 1.0.3 

     Installing activemodel 4.2.2 

     Installing jbuilder 2.2.3 

     Installing pundit 1.1.0 

     Installing activejob 4.2.2 

     Installing activerecord 4.2.2 

     Installing polyamorous 1.3.0 

     Installing rails-dom-testing 1.0.7 

     Installing loofah 2.0.3 

     Installing rails-html-sanitizer 1.0.2 

     Installing actionview 4.2.2 

     Installing actionpack 4.2.2 

     Installing actionmailer 4.2.2 

     Installing railties 4.2.2 

     Installing formtastic 3.1.4 

     Installing has_scope 0.6.0 

     Installing sprockets-rails 3.0.0 

     Installing kaminari 0.16.3 

     Installing ransack 1.7.0 

     Installing draper 2.1.0 

     Installing coffee-rails 4.1.0 

     Installing responders 2.1.1 

     Installing jquery-ui-rails 5.0.5 

     Installing jquery-rails 4.0.3 

     Installing rails 4.2.2 

     Installing turbolinks 2.3.0 

     Installing sass-rails 5.0.2 

     Installing inherited_resources 1.6.0 

     Installing devise 3.5.6 

     Installing activeadmin 1.0.0.pre2 

     Bundle complete! 24 Gemfile dependencies, 74 gems now installed. 

     Gems in the groups development and test were not installed. 

     Bundled gems are installed into ./vendor/bundle. 

     Post-install message from rdoc: 

     Depending on your version of ruby, you may need to install ruby rdoc/ri data: 

     <= 1.8.6 : unsupported 

     = 1.8.7 : gem install rdoc-data; rdoc-data --install 

     = 1.9.1 : gem install rdoc-data; rdoc-data --install 

     >= 1.9.2 : nothing to do! Yay! 

     Bundle completed (23.34s) 

     Cleaning up the bundler cache. 

sh: 2: Syntax error: Unterminated quoted string 

sh: 2: Syntax error: Unterminated quoted string 

! 

!  Could not detect rake tasks 

!  ensure you can run `$ bundle exec rake -P` against your app 

!  and using the production group of your Gemfile. 

!  rake aborted! 

!  Bundler::GemRequireError: There was an error while trying to load the gem 'activeadmin'. 

!  /tmp/build_e5688395917c72f2956d14c05dd2fdf5/nischaynamdev-hostel_mess_pay-a993b86d6645abbdfb41cb6de99c6900648d588f/vendor/bundle/ruby/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require' 

!  /tmp/build_e5688395917c72f2956d14c05dd2fdf5/nischaynamdev-hostel_mess_pay-a993b86d6645abbdfb41cb6de99c6900648d588f/vendor/bundle/ruby/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 

!  /tmp/build_e5688395917c72f2956d14c05dd2fdf5/nischaynamdev-hostel_mess_pay-a993b86d6645abbdfb41cb6de99c6900648d588f/vendor/bundle/ruby/2.2.0/gems/bundler-1.11 

我production.rb文件:

Rails.application.configure do 
    # Settings specified here will take precedence over those in config/application.rb. 
    # Code is not reloaded between requests. 
    config.cache_classes = true 
    config.force_ssl = true 
    config.serve_static_assets = true 
    # Eager load code on boot. This eager loads most of Rails and 
    # your application in memory, allowing both threaded web servers 
    # and those relying on copy on write to perform better. 
    # Rake tasks automatically ignore this option for performance. 
    config.eager_load = true 

    # Full error reports are disabled and caching is turned on. 
    config.consider_all_requests_local  = false 
    config.action_controller.perform_caching = true 

    # Enable Rack::Cache to put a simple HTTP cache in front of your application 
    # Add `rack-cache` to your Gemfile before enabling this. 
    # For large-scale production use, consider using a caching reverse proxy like 
    # NGINX, varnish or squid. 
    # config.action_dispatch.rack_cache = true 

    # Disable serving static files from the `/public` folder by default since 
    # Apache or NGINX already handles this. 
    config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? 

    # Compress JavaScripts and CSS. 
    config.assets.js_compressor = :uglifier 
    # config.assets.css_compressor = :sass 

    # Do not fallback to assets pipeline if a precompiled asset is missed. 
    config.assets.compile =true 

    # Asset digests allow you to set far-future HTTP expiration dates on all assets, 
    # yet still be able to expire them through the digest params. 
    config.assets.digest = true 

    # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb 

    # Specifies the header that your server uses for sending files. 
    # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 
    # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 

    # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 
    # config.force_ssl = true 

    # Use the lowest log level to ensure availability of diagnostic information 
    # when problems arise. 
    config.log_level = :debug 

    # Prepend all log lines with the following tags. 
    # config.log_tags = [ :subdomain, :uuid ] 

    # Use a different logger for distributed setups. 
    # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 

    # Use a different cache store in production. 
    # config.cache_store = :mem_cache_store 

    # Enable serving of images, stylesheets, and JavaScripts from an asset server. 
    # config.action_controller.asset_host = 'http://assets.example.com' 

    # Ignore bad email addresses and do not raise email delivery errors. 
    # Set this to true and configure the email server for immediate delivery to raise delivery errors. 
    # config.action_mailer.raise_delivery_errors = false 

    # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 
    # the I18n.default_locale when a translation cannot be found). 
    config.i18n.fallbacks = true 

    # Send deprecation notices to registered listeners. 
    config.active_support.deprecation = :notify 

    # Use default logging formatter so that PID and timestamp are not suppressed. 
    config.log_formatter = ::Logger::Formatter.new 

    # Do not dump schema after migrations. 
    config.active_record.dump_schema_after_migration = false 
    config.assets.precompile += 
     %w(#{Rails.root}/vendor/assets/stylesheets/active_admin.css.scss) 
    config.assets.precompile += 
     %w(#{Rails.root}/vendor/assets/javascripts/active_admin.js.coffee) 

    RAILS_ENV=production bundle exec rake assets:precompile 

    config.action_mailer.raise_delivery_errors = true 
    config.action_mailer.delivery_method = :smtp 
    host = 'messpay.herokuapp.com' 
    config.action_mailer.default_url_options = { host: host } 
    ActionMailer::Base.smtp_settings = { 
     :address  => 'smtp.sendgrid.net', 
     :port   => '587', 
     :authentication => :plain, 
     :user_name  => ENV['SENDGRID_USERNAME'], 
     :password  => ENV['SENDGRID_PASSWORD'], 
     :domain   => 'heroku.com', 
     :enable_starttls_auto => true 
end 

Rake文件

# Add your own tasks in files placed in lib/tasks ending in .rake, 
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 

require File.expand_path('../config/application', __FILE__) 

Rails.application.load_tasks 

的Gemfile:

source 'https://rubygems.org' 
gem 'jquery-ui-rails' 

gem 'activeadmin', '~> 1.0.0.pre2' 
gem 'devise' 
gem 'cancan' 
gem 'draper' 
gem 'pundit' 
gem 'rails',  '4.2.2' 
gem 'bcrypt',    '3.1.7' 
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6' 
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 'byebug',  '3.4.0' 
    gem 'web-console', '2.0.0.beta3' 

    gem 'spring',  '1.1.3' 
end 

group :test do 
    gem 'minitest-reporters', '~> 1.1', '>= 1.1.7' 
    gem 'mini_backtrace',  '0.1.3' 
    gem 'guard-minitest',  '2.3.1' 
end 

group :production do 
    gem 'rails_12factor', '0.0.2' 
    gem 'puma', '~> 2.16' 
end 

我已经试过大部分的预编译的命令选项,你可以检查我的production.rb但建立日志显示在主动管理的宝石的问题!

help me plz thxx

+0

我想尝试使用'heroku run bash'连接到heroku机器,然后尝试手动安装activeadmin gem。你可能会看到更多有用的错误。 –

+0

得到这个错误! –

+0

'错误:执行gem时(Gem :: DependencyError)' @maxpleaner –

回答

0

看看你的宝石文件。它似乎有一个问题,试图加载生产环境的gem ActiveAdmin,我会从那里开始,可能会上传它来查看。

**阅读Gemfile后...我认为这可能是好的。

所以我想改变config.assets.compile =trueconfig.assets.compile = true所以基本上增加一个空间,以防造成问题。然后我会运行bundle exec rake -P,就像它在错误本身中所暗示的那样。然后尝试rake assets:precompile,看看是否可以解决问题。你可能也需要运行heroku run rake db:migrate。我之前用Heroku有过这样的问题。

+0

我需要将activeadmin创业板上的宝石文件的生产组? –

+0

不确定而不看Gemfile本身....我在考虑生产组设置中存在错误。你可以编辑这个问题来添加Gemfile的内容吗? –

+0

ohk ..我现在正在编辑 –