CompassRails.rails4? returns false with Rails 4.2.0
Closed this issue · 9 comments
I have the following message:
Unsupported rails environment for compass
This seems to be due to a bug with the Rails version comparison:
Loading development environment (Rails 4.2.0)
irb(main):001:0> CompassRails.rails4?
=> false
irb(main):002:0> CompassRails.rails_version
=> "4.2.0"
irb(main):003:0>
What version are you using?
compass-rails (2.0.4)
Don't know what to tell you, you aren't giving me enough information to investigate this. If you can make a test to reproduce it I'd accept a patch, but TravisCI says things are working fine on (Rails 4.x)[https://travis-ci.org/Compass/compass-rails]
you aren't giving me enough information to investigate this
To be honest I don't know what I can tell more. I could try on a fresh Rails 4.2.0 project and see.
Can you point me to the test where this is tested ?
Thank you for your reply.
BTW I tried this with a fresh new Rails application version 4.1.9 and Ruby 2.2.0 and a second one with a Rails application version 4.2.0 and Ruby 2.2.0 and here is the result:
Rails 4.1.9:
Loading development environment (Rails 4.1.9)
irb(main):001:0> CompassRails.rails4?
=> true
irb(main):002:0> CompassRails.rails_version
=> "4.1.9"
Rails 4.2.0:
Loading development environment (Rails 4.2.0)
irb(main):001:0> CompassRails.rails4?
=> true
irb(main):002:0> CompassRails.rails_version
=> "4.2.0"
So seems to be something wrong in my project ... but it's really wired !
Which Ruby? I've seen some strangeness with regular expressions failing on JRuby.
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
Normal Ruby, not JRuby.
Try this branch https://github.com/Compass/compass-rails/pull/223/files
I received the message Unsupported rails environment for compass
when upgrading from rails 4.1.9 to rails 4.2.0. To remove the message I just did a bundle update compass-rails
.