You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error after including slim-rails in my Gemfile and then trying to generate a scaffold, I'm using Ruby 1.9.2p136 (Under RVM), Bundler 1.0.10, Rails 3.0.3, Slim 0.9.0 and Slim-Rails 0.1.2:
~/.rvm/gems/ruby-1.9.2-p136/gems/slim-rails-0.1.2/lib/slim-rails.rb:2:in `require': no such file to load -- slim/rails (LoadError)
from ~/.rvm/gems/ruby-1.9.2-p136/gems/slim-rails-0.1.2/lib/slim-rails.rb:2:in `<top (required)>'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `block in require'
from ~.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.10/lib/bundler.rb:120:in `require'
from ~/code/ruby/test_slim_rails/config/application.rb:7:in `<top (required)>'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands.rb:15:in `require'
from ~/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands.rb:15:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
The text was updated successfully, but these errors were encountered:
My apologies, I assumed that I didn't need to explicitly include Slim as it's a dependancy of slim-rails and would therefore be being installed anyway. Didn't realise that you need to also have the extra require:
gem 'slim', :require => 'slim/rails'
Many thanks for your prompt reply and for your code.
Not sure if it makes any difference, but you just need the gem 'slim' part and not the require part because the slim-rails gem does this require internally.
I get the following error after including slim-rails in my Gemfile and then trying to generate a scaffold, I'm using Ruby 1.9.2p136 (Under RVM), Bundler 1.0.10, Rails 3.0.3, Slim 0.9.0 and Slim-Rails 0.1.2:
The text was updated successfully, but these errors were encountered: