Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no such file to load -- slim/rails #4

Closed
rosstimson opened this issue Feb 1, 2011 · 3 comments
Closed

no such file to load -- slim/rails #4

rosstimson opened this issue Feb 1, 2011 · 3 comments

Comments

@rosstimson
Copy link

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>'
@leogalmeida
Copy link
Contributor

Hi,

it seems you haven't included gem 'slim' in your GemFile. Please, let me know if it was it.

@rosstimson
Copy link
Author

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.

@leogalmeida
Copy link
Contributor

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.

Cheers,

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants