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

JRuby 1.7.19 causes Rails.root to return backslashes in Windows environment #2921

Closed
JackWCollins opened this issue May 8, 2015 · 1 comment

Comments

@JackWCollins
Copy link

I am working with Rails using TorqueBox and JRuby. I recently upgraded to TorqueBox 3.1.2 which included a JRuby upgrade from 1.7.13 to 1.7.19. I noticed a breaking change on Windows machines where the Rails.root will return a Pathname object with backslashes instead of forward slashes. This causes issues in situations where you need to match file paths. For example, this broke our AngularJS Jasmine tests because the jasmine-rails gem was not able to find the application.js file using the Dir.glob method.

I originally thought the issue was with TorqueBox, but upon comparing JRuby version while keeping TorqueBox consistent you can see that JRuby is the cause of the issue. Notice the file paths returned upon running Rails.root in a rails console.

Working Versions

Torquebox 3.1.2 with JRuby 1.7.13 (2.0.0-p195) (JRUBY_OPTS = --2.0)

About your application's environment
Ruby version              2.0.0-p195 (java)
RubyGems version          2.1.9
Rails version             4.1.1

Rails.root = <Pathname:C:/Users/jacollins/RubymineProjects/ViewPoint>

Torquebox 3.1.2 JRuby 1.7.13 (1.9.3-p392)

About your application's environment
Ruby version              1.9.3-p392 (java)
RubyGems version          2.1.9
Rails version             4.1.1

Rails.root = <Pathname:C:/Users/jacollins/RubymineProjects/ViewPoint>

Broken Versions

Torquebox 3.1.2 JRuby 1.7.19 (2.0.0p598) (JRUBY_OPTS = --2.0)

About your application's environment
Ruby version              2.0.0-p598 (java)
RubyGems version          2.1.9
Rails version             4.1.1

Rails.root = <Pathname:C:\Users\jacollins\RubymineProjects\ViewPoint>

Torquebox 3.1.2 JRuby 1.7.19 (1.9.3p551)

About your application's environment
Ruby version              1.9.3-p551 (java)
RubyGems version          2.1.9
Rails version             4.1.1

Rails.root = <Pathname:C:\Users\jacollins\RubymineProjects\ViewPoint>

Let me know if you need any other information.

@kares
Copy link
Member

kares commented Mar 1, 2018

optimistically closing this one as a JRuby 1.7.x (EOL-ed) issue.
feel free to let us know if there are any issues with back-slashed on Windows using JRuby 9K

@kares kares closed this as completed Mar 1, 2018
@kares kares added this to the Won't Fix milestone Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants