Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

twitter-bootstrap-rails not working on heroku

I am working on ROR app, the app is working fine on local host but when on heroku "http://niveshi.herokuapp.com/portfolio/create" bootstrap is not working and even javascript code is not working. This is my gem file :

source 'https://rubygems.org'

gem 'rails', '3.2.12'

gem "mongoid", "~> 3.1.0"

  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
gem 'sass-rails',   '~> 3.1.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'less-rails'


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

 gem 'uglifier', '>= 1.0.3'
 end

 gem 'jquery-rails'
 gem 'delayed_job_mongoid'
 gem 'rb-readline', '~> 0.4.2'

  gem 'mechanize'
  gem 'debugger'
  gem 'twitter-bootstrap-rails'

Any guesses where I am wrong.

like image 321
Deepender Singla Avatar asked Nov 29 '22 15:11

Deepender Singla


1 Answers

Use this on production.rb

config.assets.compile = true

If it is not work Then do the following things. rake assets:precompile it will generate assets file in your public folder, commit all those file then push the code into heroku server.

like image 199
Sandip Mondal Avatar answered Dec 04 '22 06:12

Sandip Mondal