| View previous topic :: View next topic |
| Author |
Message |
borand
Joined: 13 Oct 2008 Posts: 4
|
Posted: Mon Oct 13, 2008 10:13 pm Post subject: LoadError... |
|
|
Hi....
Using NB 6.1 at Ubuntu 8.04.
I'm making a Ruby script that needs to use the 'highline/import', but I get this error when running my program:
/home/dk90394/netbeans-6.1/ruby2/jruby-1.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require': no such file to load -- highline/import (LoadError)
from /home/dk90394/netbeans-6.1/ruby2/jruby-1.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /media/disk/data/Projects/ManUpDate/lib/new_main.rb:6
This is the program:
require 'rubygems'
require 'highline/import'
username = ask("Enter your username: ") { |q| q.echo = true }
password = ask("Enter your password: ") { |q| q.echo = "*" }
I have tried to run it from the commandline, and here it works fine. I have tried to select Tools-Ruby Gems, to update Gems, but here I get a connection error....
What should I do, to use the 'modules' inside NB ??
Regards Jørn. |
|
| Back to top |
|
 |
Anthony Richardson Posted via mailing list.
|
Posted: Mon Oct 13, 2008 10:47 pm Post subject: LoadError... |
|
|
In netbeans you are using jruby, are you using jruby outside of netbeans as well? if not you will either have to instal the gem into jRuby or swap the platform in Netbeans to use MRI ruby instead of jRuby.
In Netbeans 6.5 this is done on a project by project basis, in Netbenas 6.1 I can;t remember if that use the one platfom setting for all project s or not.
Right-click yout project node and select "properties" if the platform setting isn't there then look in "tools|Options" menu or similar location.
Cheers,
Anthony
On Tue, Oct 14, 2008 at 8:43 AM, borand <address-removed ([email]address-removed[/email])> wrote:
| Quote: |
Hi....
Using NB 6.1 at Ubuntu 8.04.
I'm making a Ruby script that needs to use the 'highline/import', but I get this error when running my program:
/home/dk90394/netbeans-6.1/ruby2/jruby-1.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require': no such file to load -- highline/import (LoadError)
from /home/dk90394/netbeans-6.1/ruby2/jruby-1.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /media/disk/data/Projects/ManUpDate/lib/new_main.rb:6
This is the program:
require 'rubygems'
require 'highline/import'
username = ask("Enter your username: ") { |q| q.echo = true }
password = ask("Enter your password: ") { |q| q.echo = "*" }
I have tried to run it from the commandline, and here it works fine. I have tried to select Tools-Ruby Gems, to update Gems, but here I get a connection error....
What should I do, to use the 'modules' inside NB ??
Regards J |
|
| Back to top |
|
 |
borand
Joined: 13 Oct 2008 Posts: 4
|
Posted: Tue Oct 14, 2008 6:17 pm Post subject: |
|
|
Thanks Anthony,
I did change the 'Ruby' interpreter from jruby to ruby, and then I get this error below:
Enter your username: sd
stty: standard input: Invalid argument
stty: standard input: Invalid argument
Enter your password: sd
**
stty: standard input: Invalid argument
What could be the cause of this ??
In the password line, it should not type the password, just type *'s which it does after hitting return, but it seems to work - it collects the values, and it can be used in the script. and the file in the directory work fine, without the errors... But would be nice to get rid of the errors inside NB. |
|
| Back to top |
|
 |
Anthony Richardson Posted via mailing list.
|
Posted: Tue Oct 14, 2008 9:56 pm Post subject: LoadError... |
|
|
Sorry I don't know the answer to that problem.
On Wed, Oct 15, 2008 at 4:47 AM, borand <address-removed ([email]address-removed[/email])> wrote:
| Quote: |
stty: standard input: Invalid argument
What could be the cause of this ??
|
|
|
| Back to top |
|
 |
Martin Krauskopf Posted via mailing list.
|
Posted: Wed Oct 15, 2008 6:20 am Post subject: LoadError... |
|
|
borand wrote:
| Quote: | Thanks Anthony,
I did change the 'Ruby' interpreter from jruby to ruby, and then I get this error below:
Enter your username: sd
stty: standard input: Invalid argument
stty: standard input: Invalid argument
Enter your password: sd
**
stty: standard input: Invalid argument
What could be the cause of this ??
|
Hi,
this is due to the fact that HighLine library emits low-level calls to
the system like in the HighLine::SystemExtensions#raw_no_echo_mode method:
def raw_no_echo_mode
@state = `stty -g`
system "stty raw -echo cbreak isig"
end
The simulation of terminal in NetBeans is now pretty blunt - just a
textarea reading the input and writing the output.
For NetBeans.next release the full Terminal Emulation is one of the most
important features (was not doable for 6.5). You might CC yourself here:
http://www.netbeans.org/issues/show_bug.cgi?id=133994
to watch the progress. Until that is implemented, the full TE
simulation, there is now workaround for your 'password' case.
m. |
|
| Back to top |
|
 |
borand
Joined: 13 Oct 2008 Posts: 4
|
Posted: Wed Oct 15, 2008 6:48 am Post subject: |
|
|
Hi Martin
Thank you for the answer/explanation. It is always nice to know how stuff works.
Looking forward for the next release, but the 'problem' is not that big, so I will continue.
Regards Jørn. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
|