Ruby - Trying it again
This issue has been resolved --> Here
Still issues running JRuby with NetBeans and Windows. I've upgraded NetBeans from version 6.1 to 6.5 beta to see if the latest and greatest fixes my issues.
I find this especially irritating given the amount of hype around the framework as a whole. (IntelliJ demo, Netbeans 10-minute JRuby Blog).
It seems most of the issues lie in platform-specific gems, and net-ssh seems to be written for use with PuTTY's pageant, which requires "native interfacing" or "native extensions". Is it possible?
Well, I'm starting off trying to ssh into a remote device using Ruby samples from this script inside the NetBeans IDE.
Upon first try, I got the following:
I get a new message:
And now I get the following:
I tried to install the win32-api but JRuby gem install returns with error "Jruby does not support native extensions", which makes perfect sense!
When finished, I'll have a detailed write-up for this. Automated ssh, sftp, scp through Ruby scripts would be a really nice addition to a Java application, despite the platform.
Any help is welcome.
Cheers.
-Tres
Still issues running JRuby with NetBeans and Windows. I've upgraded NetBeans from version 6.1 to 6.5 beta to see if the latest and greatest fixes my issues.
I find this especially irritating given the amount of hype around the framework as a whole. (IntelliJ demo, Netbeans 10-minute JRuby Blog).
It seems most of the issues lie in platform-specific gems, and net-ssh seems to be written for use with PuTTY's pageant, which requires "native interfacing" or "native extensions". Is it possible?
Well, I'm starting off trying to ssh into a remote device using Ruby samples from this script inside the NetBeans IDE.
Upon first try, I got the following:
failed to load dl/importUsing this tutorial from Juan Pablo I was able to modify:
C:\Program Files\NetBeans 6.5 Beta\ruby2\jruby-1.1.3\lib\ruby\gems\1.8\gems\net-ssh-2.0.4\lib\net\ssh\authentication\pageant.rband
C:\Program Files\NetBeans 6.5 Beta\ruby2\jruby-1.1.3\lib\ruby\gems\1.8\gems\net-ssh-2.0.4\lib\net\ssh\known_hosts.rb
I get a new message:
The system cannot find the path specifiedI looked for debug options with the JRuby command, and found them:
C:\Program Files\NetBeans 6.5 Beta\ruby2\jruby-1.1.3\bin\jruby.bat -d C:\path_to_my\main.rb
And now I get the following:
Exception `LoadError' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34 - no such file to load -- opensslInstalling hiline yeilds this new error:
C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/transport/state.rb:85 warning: Useless use of a variable in void context.
Exception `LoadError' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34 - no such file to load -- highline
Exception `LoadError' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34 - no such file to load -- termios
SSH Starting...
Exception `Net::SSH::Exception' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/transport/algorithms.rb:296 - could not settle on language_client algorithm
Exception `Net::SSH::Exception' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/transport/algorithms.rb:296 - could not settle on language_server algorithm
The system cannot find the path specified
Exception `Net::SSH::Authentication::AgentNotAvailable' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/authentication/agent.rb:74 - private method `open' called for Net::SSH::Authent
ication::Pageant::Socket:Class
Exception `Net::SSH::ChannelRequestFailed' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/connection/channel.rb:544 - Net::SSH::ChannelRequestFailed
Exception `LoadError' at C:/Program Files/NetBeans 6.5 Beta/ruby2/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34 - no such file to load -- Win32APII now have hiline, termios, net-ssh, open-ssl and not much more luck....
I tried to install the win32-api but JRuby gem install returns with error "Jruby does not support native extensions", which makes perfect sense!
When finished, I'll have a detailed write-up for this. Automated ssh, sftp, scp through Ruby scripts would be a really nice addition to a Java application, despite the platform.
Any help is welcome.
Cheers.
-Tres
Comments
You are correct that you can't use gems that have native extenstions. See http://kenai.com/projects/jruby/pages/GettingStarted#Installing_and_using_Gems_in_JRuby.