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

Can't run rails if jruby's path contains whitespaces #3878

Closed
ahorek opened this issue May 12, 2016 · 0 comments · Fixed by #3879
Closed

Can't run rails if jruby's path contains whitespaces #3878

ahorek opened this issue May 12, 2016 · 0 comments · Fixed by #3879
Milestone

Comments

@ahorek
Copy link
Contributor

ahorek commented May 12, 2016

Environment

jruby 9.1.1.0-SNAPSHOT (2.3.0) 2016-05-11 9a2310a Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b18 +jit [mswin32-x86_64]

Expected Behavior

no exception

Actual Behavior

rails is trying to load Gem.ruby path which is double quoted if the path contains whitespaces
then withExeSuffix(fname) method returns false even if the suffix is present
and it ends up with paths like this one "C:/jruby test/jruby/bin/jruby.exe".exe

https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/util/ShellLauncher.java#L360

C:\jruby test\jruby\bin\jruby.exe -S rails s

Errno::ENOENT: No such file or directory - "C:/jruby test/jruby/bin/jruby.exe"
           _exec_internal at org/jruby/RubyKernel.java:1635
                     exec at uri:classloader:/jruby/kernel/kernel.rb:17
  block in exec_app_rails at C:/jruby test/jruby/lib/ruby/gems/shared/gems/railties-4.2.5.2/lib/rails/app_rails_loader.rb:41
                     loop at org/jruby/RubyKernel.java:1290
           exec_app_rails at C:/jruby test/jruby/lib/ruby/gems/shared/gems/railties-4.2.5.2/lib/rails/app_rails_loader.rb:34
                    <top> at C:/jruby test/jruby/lib/ruby/gems/shared/gems/railties-4.2.5.2/lib/rails/cli.rb:5
                  require at org/jruby/RubyKernel.java:944
                   (root) at C:/jruby test/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
                    <top> at C:/jruby test/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:69
                     load at org/jruby/RubyKernel.java:962
                    <top> at C:/jruby test/jruby/bin/rails:23
@enebo enebo added this to the JRuby 9.1.1.0 milestone May 19, 2016
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

Successfully merging a pull request may close this issue.

2 participants