Question

UPD: my bad, i have 2 local branches master and heroku. I was pushing from heroku branch (in which i was making my changes) by git push heroku master, so my local master branch was pushed instead of local heroku to remote master. If someone is experiencing same problem, keep your mind that heroku works only with master branch. Make your pushes right: git push <remote> <local-branch>:<remote-branch>

New problem: Now i have faced another problem. While assets:precompile completes (the public/assets folder is populated) without errors, server does not serve assets, so i have no styles nor scripts. Every request to any asset returns 404. I tried to make new server with different app (very simple, with bootstrap included), same result.

Original question: I've deleted every mention of turbolinks from the project (in application.js, Gemfile and also from layout), but nothing helps. Deployment to heroku keeps on failing on assets:precompile.

   I, [2014-01-27T16:55:13.789592 #1579]  INFO -- : Writing /tmp/build_fedb5742-a4ef-49f7-a837-3b092b48052c/public/assets/active_admin-d5eac0453c093d372f4a0c6ce08b29fb.js
   rake aborted!
   couldn't find file 'turbolinks'
   (in /tmp/build_fedb5742-a4ef-49f7-a837-3b092b48052c/app/assets/javascripts/application.js:15)

application.js is empty.

My Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'

# Use postgresql as the database for Active Record
gem 'pg'

gem 'activeadmin', github: 'gregbell/active_admin'

gem 'rails-i18n', '~> 4.0.0'

gem 'unicorn'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

group :development do
  gem 'foreman'
end
Was it helpful?

Solution

I've solved it.

Just set config.serve_static_assets to true in environments/production.rb Btw, strange option. Isn't heroku powered by apache or nginx?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top