I am developing Ruby on Rails on Macbook Air.
I am studying Chapter 3 of the Ruby on Rails tutorial, but I am getting an error when I try to generate a StaticPages controller.
rails generate controller StaticPages home help -- no-test-framework
If you enter , you will receive an error similar to the following:
/Users/xxx/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/ass-rails-5.0.0/lib/ass/rails/helpers.rb:11:
in `<top(required)>':uninitialized constant Pass::Script(NameError)
What is the cause and what should I do to resolve this?
By the way, the development environment is ruby version 2.2.1p85 and rails version 4.2.4 using rbenv.
Ruby on Rails tutorial environment is 2.0.0 for ruby and 4.0.5 for Rails using RVM.
Perhaps you need to specify a version for sass-rails.
Why don't you add gem'sass-rails', '5.0.3'
to your Gemfile?
https://stackoverflow.com/questions/29716284/uninitialized-constant-sassscript-nameerror
RVM
, but the directory configuration is rbenv
, so
Why don't you uninstall one of them?
When you do rails tutorial, be sure to match the versions!
I used to do it with the latest version, but due to an error,
It stumbles where it's not the essence...
It might be better to switch the Ruby version and then do a new one.
How to specify the version and rails new
First of all, why don't you try bundle update pass-rails?
© 2024 OneMinuteCode. All rights reserved.