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

UnsatisfiedLinkError when launching rails console on Windows. #3769

Closed
SuperMasterBlasterLaser opened this issue Mar 31, 2016 · 4 comments
Closed

Comments

@SuperMasterBlasterLaser

Environment

JRuby version - 9.0.5.0 (2.2.3)
JDK 8
Windows 7 64bit

Expected Behavior

I have run rails console via RubyMine:

   jruby.exe --1.8 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "D:/jruby-test-app/bin/rails" console

Actual Behavior

It throws this error:

   LoadError: load error: rails/commands -- java.lang.UnsatisfiedLinkError: ???????? ??????? ?????????.
   require at org/jruby/RubyKernel.java:937
        <top> at D:/jruby-test-app/bin/rails:4
               load at org/jruby/RubyKernel.java:955
       <top> at -e:1

Why does this happen?

@preetpalS
Copy link

When I run JRuby on Windows (Windows 10), I don't run into any issues running the Rails console (note that JRuby should ideally be the only version of Ruby available on your path (or just put the folder C:\jruby-9.0.5.0 at the front of your path by entering set PATH=C:\jruby-9.0.5.0;%PATH% from the command prompt for your command prompt session)).

When I run the Rails console on Windows 10 using the same version of JRuby, I don't run into any errors:

C:\test\test>jruby -S bundle exec rails console
Loading development environment (Rails 4.2.6)
irb(main):001:0> puts RUBY_PLATFORM
java
=> nil
irb(main):002:0> Rails.env
=> "development"
irb(main):003:0> Rails.version
=> "4.2.6"
irb(main):004:0> exit

C:\test\test>jruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 25.74-b02 on 1.8.0_74-b02 +jit [Windows 10-amd64]

C:\test\test>

Also note that the command line argument (--1.8) you are passing to JRuby is ignored.

@preetpalS
Copy link

I've also never seen the error shown in the unexpected behavior before either (LoadError: load error: rails/commands -- java.lang.UnsatisfiedLinkError: ???????? ??????? ?????????.) and I've been using JRuby on Windows for a while. Maybe verify that JRuby is even able to run from RubyMine with the command jruby -e "puts 'hi'"

@boskowski
Copy link

boskowski commented Jan 18, 2017

This is a duplicate of issue #3625, which had been solved in 9.1.3.0 but reappeared in subsequent releases.

It can be easily tested by executing (from CMD or Powershell):

echo "puts 'hello'" | jruby -S jirb

@kares
Copy link
Member

kares commented Jun 23, 2017

closing per @boskowski's comment ^^^ ... this has been resolved, let us know if you feel otherwise. thanks

@kares kares closed this as completed Jun 23, 2017
@kares kares added this to the Invalid or Duplicate milestone Jun 23, 2017
@kares kares added the windows label Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants