Two machines are in question here. Machine1 is working perfectly fine, while Machine2 is a new setup. The operating systems on the two machines are different - Machine1 runs OSX 10.6 Snow Leopard and Machine2 runs OSX 10.8 Mountain Lion. I have uploaded my project to Github, so the plan is to install Xcode, homebrew, git, rvm, ruby, rails on Machine2, clone the project, bundle install, run rake, and everything should be good to go, right?
Unfortunately, upon checking, it appears that the stylesheets are not loading correctly. There seems to be no CSS styling applied as indicated by the application.css file:
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require bootstrap_and_overrides
*= require_tree
*= require jquery.ui.datepicker
*= require jquery.facebox
*/
Could there be something that I'm overlooking? I even went ahead and ran
rails generate bootstrap:install less
, but still no luck. It seems like the application.css file is not being interpreted for some reason.
I initially suspected that the Ruby version might be the issue since Machine2 was using Ruby 2.0 while Machine1 was running on Ruby 1.9.2. As an attempt to resolve this, I installed Ruby 1.9.2 on Machine2, but unfortunately, the problem persists.
All of this troubleshooting is happening in development mode. At one point, I tried including the bootstrap_and_overrides
stylesheet in the layout and saw some styling changes, but clearly, that's not the solution.
Below are some key configurations:
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'twitter-bootstrap-rails'
gem 'less-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
development.rb
Experts::Application.configure do
config.cache_classes = false
config.whiny_nils = true
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log
config.action_dispatch.best_standards_support = :builtin
config.active_record.mass_assignment_sanitizer = :strict
config.active_record.auto_explain_threshold_in_seconds = 0.5
config.assets.compress = false
config.assets.debug = true
end