ruby on rails - Heroku on Ubuntu 14.04 -


i following 'ruby on rails tutorial' michael hartl. on chapter 3 when try deploy working sample app heroku rejected, , though understand error message not know how correct it. here gemfile:

source 'https://rubygems.org' ruby '2.0.0' #ruby-gemset=railstutorial_rails_4_0  gem 'rails', '4.0.5'  group :development, :test   gem 'sqlite3', '1.3.8'   gem 'rspec-rails', '2.13.1' end  group :test   gem 'selenium-webdriver', '2.35.1'   gem 'capybara', '2.1.0' end  gem 'sass-rails', '4.0.1' gem 'uglifier', '2.1.1' gem 'coffee-rails', '4.0.1' gem 'jquery-rails', '3.0.4' gem 'turbolinks', '1.1.1' gem 'jbuilder', '1.0.2'  group :doc   gem 'sdoc', '0.3.20', require: false end  group :production   gem 'pg', '0.15.1'   gem 'rails_12factor', '0.0.2' end 

and here file issue originates config/environments/development.rb:

sampleapp::application.configure   # settings specified here take precedence on in config/application.rb.    # in development environment application's code reloaded on   # every request. slows down response time perfect development   # since don't have restart web server when make code changes.   config.cache_classes = false    # not eager load code on boot.   config.eager_load = false    # show full error reports , disable caching.   config.consider_all_requests_local       = true   config.action_controller.perform_caching = false    # don't care if mailer can't send.   config.action_mailer.raise_delivery_errors = false    # print deprecation notices rails logger.   config.active_support.deprecation = :log    # raise error on page load if there pending migrations.   config.active_record.migration_error = :page_load    # debug mode disables concatenation , preprocessing of assets.   # option may cause significant delays in view rendering large   # number of complex assets.   config.assets.debug = true    # adds additional error checking when serving assets @ runtime.   # checks improperly declared sprockets dependencies.   # raises helpful error messages.   config.assets.raise_runtime_errors = true    # raises error missing translations   # config.action_view.raise_on_missing_translations = true end 

the errors attempting 'git push heroku master':

   running: rake assets:precompile    rake aborted!    nomethoderror: undefined method `configure' #<sampleapp::application:0x007fc7f03f7298> 

and after long list of paths get:

 !  !     precompiling assets failed.  !   !     push rejected, failed compile ruby app  git@heroku.com:some-name.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed push refs 'git@heroku.com:some-name.git' 

any idea how fix please? deployments working under ubuntu.

thank you!

by default rails 4 not serve assets. enable functionality need go config/application.rb , add line:

config.serve_static_assets = true

have read through documentation on heroku - https://devcenter.heroku.com/articles/rails-4-asset-pipeline

hope helps. :)


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -