title: Rails 4 + Devise + Heroku
body: <p>im trying to deploy my application to the Heroku.
  I'm using Rails 4, latest Devise(tried both <code>3.0.0.rc</code> and from the repo) and ruby 1.9.3(also tried 2.0).
  I can't get past initial push, seems like heroku doesn't see devise. Locally <code>assets:precompile</code> task runs without problem.
  Here is the output:</p>
  
  <pre><code>git push heroku master                                                                                                                                      -----&gt; Ruby/Rails app detected
  -----&gt; Using Ruby version: ruby-1.9.3
  -----&gt; Installing dependencies using Bundler version 1.3.2
         Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
         Fetching gem metadata from https://rubygems.org/..........
         Fetching gem metadata from https://rubygems.org/..
         Installing rake (10.1.0)
         Installing i18n (0.6.4)
         Installing minitest (4.7.5)
         Installing multi_json (1.7.7)
         Installing atomic (1.1.10)
         Installing thread_safe (0.1.0)
         Installing tzinfo (0.3.37)
         Installing activesupport (4.0.0)
         Installing builder (3.1.4)
         Installing erubis (2.7.0)
         Installing rack (1.5.2)
         Installing rack-test (0.6.2)
         Installing actionpack (4.0.0)
         Installing mime-types (1.23)
         Installing polyglot (0.3.3)
         Installing treetop (1.4.14)
         Installing mail (2.5.4)
         Installing actionmailer (4.0.0)
         Installing activemodel (4.0.0)
         Installing activerecord-deprecated_finders (1.0.3)
         Installing arel (4.0.0)
         Installing activerecord (4.0.0)
         Installing bcrypt-ruby (3.0.1)
         Installing coffee-script-source (1.6.3)
         Installing execjs (1.4.0)
         Installing coffee-script (2.2.0)
         Installing thor (0.18.1)
         Installing railties (4.0.0)
         Installing coffee-rails (4.0.0)
         Installing orm_adapter (0.4.0)
         Installing warden (1.2.1)
         Installing devise (3.0.0.rc)
         Installing tilt (1.4.1)
         Installing haml (4.0.3)
         Installing haml-rails (0.4)
         Installing hike (1.2.3)
         Installing jbuilder (1.4.2)
         Installing jquery-rails (3.0.2)
         Installing json (1.8.0)
         Installing mysql2 (0.3.11)
         Installing nested_form (0.3.2)
         Installing pg (0.15.1)
         Using bundler (1.3.2)
         Installing sprockets (2.10.0)
         Installing sprockets-rails (2.0.0)
         Installing rails (4.0.0)
         Installing rails_serve_static_assets (0.0.1)
         Installing rails_stdout_logging (0.0.1)
         Installing rails_12factor (0.0.2)
         Installing rdoc (3.12.2)
         Installing sass (3.2.9)
         Installing sass-rails (4.0.0)
         Installing sdoc (0.3.20)
         Installing simple_form (1.4.1)
         Installing turbolinks (1.2.0)
         Installing twitter-bootstrap-rails (2.2.7)
         Installing uglifier (2.1.1)
         Your bundle is complete! It was installed into ./vendor/bundle
         Post-install message from haml:
         HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
         your application:
         * Support for Ruby 1.8.6 dropped
         * Support for Rails 2 dropped
         * Sass filter now always outputs &lt;style&gt; tags
         * Data attributes are now hyphenated, not underscored
         * html2haml utility moved to the html2haml gem
         * Textile and Maruku filters moved to the haml-contrib gem
         For more info see:
         http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
         Post-install message from rdoc:
         Depending on your version of ruby, you may need to install ruby rdoc/ri data:
         &lt;= 1.8.6 : unsupported
         = 1.8.7 : gem install rdoc-data; rdoc-data --install
         = 1.9.1 : gem install rdoc-data; rdoc-data --install
         &gt;= 1.9.2 : nothing to do! Yay!
         Post-install message from twitter-bootstrap-rails:
         Important: You may need to add a javascript runtime to your Gemfile in order for bootstrap's LESS files to compile to CSS.
         **********************************************
         ExecJS supports these runtimes:
         therubyracer - Google V8 embedded within Ruby
         therubyrhino - Mozilla Rhino embedded within JRuby
         Node.js
         Apple JavaScriptCore - Included with Mac OS X
         Microsoft Windows Script Host (JScript)
         **********************************************
         Cleaning up the bundler cache.
  -----&gt; Writing config/database.yml to read from DATABASE_URL
  -----&gt; Preparing app for Rails asset pipeline
         Running: rake assets:precompile
         rake aborted!
         undefined method `devise' for #&lt;Class:0x00000002962218&gt;
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.0/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
         /tmp/build_238qt4r3vnes0/app/models/user.rb:5:in `&lt;class:User&gt;'
         /tmp/build_238qt4r3vnes0/app/models/user.rb:1:in `&lt;top (required)&gt;'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:329:in `require_or_load'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:462:in `load_missing_constant'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in `const_missing'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `const_get'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `block in constantize'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `each'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `inject'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `constantize'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:534:in `get'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:565:in `constantize'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise.rb:274:in `get'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/mapping.rb:77:in `to'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/mapping.rb:72:in `modules'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/mapping.rb:89:in `routes'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/mapping.rb:156:in `default_used_route'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/mapping.rb:66:in `initialize'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise.rb:308:in `new'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise.rb:308:in `add_mapping'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:208:in `block in devise_for'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:207:in `each'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:207:in `devise_for'
         /tmp/build_238qt4r3vnes0/config/routes.rb:2:in `block in &lt;top (required)&gt;'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
         /tmp/build_238qt4r3vnes0/config/routes.rb:1:in `&lt;top (required)&gt;'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:102:in `reload_routes!'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/devise-3.0.0.rc/lib/devise/rails.rb:14:in `block in &lt;class:Engine&gt;'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `call'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application/finisher.rb:55:in `block in &lt;module:Finisher&gt;'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
         /tmp/build_238qt4r3vnes0/config/environment.rb:5:in `&lt;top (required)&gt;'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
         /tmp/build_238qt4r3vnes0/vendor/bundle/ruby/1.9.1/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
         Tasks: TOP =&gt; environment
         (See full trace by running task with --trace)
   !
   !     Precompiling assets failed.
   !
  
   !     Push rejected, failed to compile Ruby/Rails app
  </code></pre>
  
  <p>My Gemfile:</p>
  
  <pre><code>ruby '1.9.3'
  source 'https://rubygems.org'
  
  
  gem 'rails', '4.0.0'
  gem 'mysql2'
  gem 'simple_form'
  gem 'twitter-bootstrap-rails'
  gem 'haml-rails'
  gem 'devise', "3.0.0rc"
  gem 'nested_form'
  gem 'rails_12factor'
  
  
  gem 'sass-rails', '~&gt; 4.0.0'
  gem 'uglifier', '&gt;= 1.3.0'
  gem 'coffee-rails', '~&gt; 4.0.0'
  gem 'jquery-rails'
  gem 'turbolinks'
  gem 'jbuilder', '~&gt; 1.2'
  
  group :doc do
    gem 'sdoc', require: false
  end
  
  group :production do
    gem 'pg'
  end
  
  group :development, :test do
   gem 'rspec-rails'
   gem 'capybara'
   gem 'factory_girl_rails'
   gem 'faker'
   gem 'guard-rspec'
   gem 'terminal-notifier-guard'
   gem 'quiet_assets'
  end
  
  group :development do
    gem 'thin'
  end
  
  group :test do
   gem 'database_cleaner'
   gem 'fuubar'
   gem 'shoulda'
  end
  </code></pre>