seyhunak / twitter-bootstrap-rails

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline
https://github.com/seyhunak/twitter-bootstrap-rails
4.49k stars 997 forks source link

heroku and therubyracer #475

Closed neohunter closed 10 years ago

neohunter commented 11 years ago

Hi, 2 months ago i started using this gem on my project. I installed it on heroku without any problems with the therubyracer gem.

But since yesterday I tried to push to heroku and now my app is not working,

If i leave therubyracer or therubyracer-heroku I receive this:

ActionView::Template::Error (HandleScope::HandleScope: Entering the V8 API without proper locking in place (in /app/app/assets/stylesheets/bootstrap_and_overrides.css.less)):

If i remove it I receive:

[WARNING] Please install gem 'therubyracer' to use Less.

I tried adding gem 'less' removing gem "less-rails" adding gem 'libv8', and all kinds of combinations, i just dont work.

Heroku discorages the usage of therubyracer gem...

sajeev86 commented 11 years ago

+1 I'm getting the same problem, having tried liv8 install, less and less-rails

malachaifrazier commented 11 years ago

+1 Same Here

jameswilliamiii commented 11 years ago

Heroku should be precompiling your assets so therubyracer and others are only needed in your assets group in your gemfile for local serving of assets that are not pre-compiled. Also make sure your config/enviroment.rb file has the following line of code in it: config.assets.initialize_on_precompile = false.

jonibatista commented 11 years ago

You can solve the problem by add this to your Gemfile

group :assets do
  gem 'therubyracer', :platforms => :ruby 
end

gem "less-rails"
gem "twitter-bootstrap-rails"
gbuesing commented 11 years ago

This fixed the issue for me -- in your Gemfile, lock therubyracer to version '~> 0.10.2':

group :assets do

  gem 'therubyracer', '~> 0.10.2', :platforms => :ruby

  ... etc...

end
poori commented 11 years ago

locking it to 0.11.1 worked for me:

gem 'therubyracer',  '0.11.1', :platform => :ruby