1

I have two machines, Machine1 works just fine. Machine2 is a new machine that I'm setting up. Machine1 is running OSX 10.6 Snow Leopard and Machine2 is running OSX 10.8 Mountain Lion. I've uploaded my project to Github, so I should be able to (on Machine2) install Xcode, homebrew, git, rvm, ruby, rails. Then, clone project, bundle install, rake, and voila, right?

Nope, Stylesheets aren't loading. there's no CSS styling so I check the browser, application.css shows this:

/*
 * 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
*/

Am I forgetting something? I ran rails generate bootstrap:install less but still no dice. For some reason the application.css file isn't being interpreted.

I thought it might be an issue with the version of Ruby because Machine2 was using Ruby 2.0 and Machine1 Ruby 1.9.2, so I installed 1.9.2 on Machine2 but still nada.

This is all in development mode. Also, in trying to troubleshoot the problem I included the bootstrap_and_overrides stylesheet in the layout and then I had some styling! but that's obviously not the solution.

here's some 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
Mundo Calderon
  • 183
  • 2
  • 10
  • 2
    Got it to work. I'm too much of a Newbie to understand the issue, but I deleted my local copy of the project. Made sure that rvm is using Ruby 1.9.2 by default. Then clone'd the project again. ran `bundle install` and then I had style again! So there's something about Ruby 2.0 that was getting in the way? and even though I changed it to 1.9.2 it made no difference. I had to have 1.9.2 before ever running bundle install. I'll leave the post up just in case anyone else runs into this. – Mundo Calderon Jul 10 '13 at 18:54

1 Answers1

2

Probably downgrade less-rails version is a option, I met the problem when I upgrade to ruby 2.0.0-p247 from 1.9.3, and all gem updated. I cannot precompile in production, after I downgrade less-rails to 2.3.3, all works

rrrrong
  • 371
  • 2
  • 4
  • I'll have to try this solution on a computer that I will be receiving soon! I will accept your answer as soon as I give it a shot. Thanks! – Mundo Calderon Jan 25 '14 at 02:00