| View previous topic :: View next topic |
| Author |
Message |
aslambilal
Joined: 28 Jun 2009 Posts: 3
|
Posted: Sun Jun 28, 2009 2:30 am Post subject: Ruby Hpricot |
|
|
Hello
| Code: | require 'rubygems'
require 'hpricot'
require 'open-uri'
url = "http://api.comicvine.com/characters/?api_key=(MYAPI)&format=xml"
doc = Hpricot( open( url ) )
puts (doc/"number_of_page_results").inner_html
puts "test" |
When i try to run the file using Ctrl + f6 for testing the file
| Code: |
/usr/local/netbeans-6.5.1/ruby2/jruby-1.1.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `require': no such file to load -- hpricot (LoadError)
|
Any ideas?
P.S. When i run it from terminal it works fine, no errors
[/code] |
|
| Back to top |
|
 |
Erno Mononen Posted via mailing list.
|
Posted: Mon Jun 29, 2009 8:49 am Post subject: Ruby Hpricot |
|
|
Hello,
Can you double check that you have the hpricot gem installed for the
JRuby 1.1.4 platform you use? Note that the latest hpricot version
doesn't work with JRuby, please see
http://kenai.com/projects/jruby/pages/Hpricot for more info.
Erno
aslambilal wrote:
| Quote: | Hello
Code:
require 'rubygems'
require 'hpricot'
require 'open-uri'
url = "http://api.comicvine.com/characters/?api_key=(MYAPI)&format=xml"
doc = Hpricot( open( url ) )
puts (doc/"number_of_page_results").inner_html
puts "test"
When i try to run the file using Ctrl + f6 for testing the file
/usr/local/netbeans-6.5.1/ruby2/jruby-1.1.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `require': no such file to load -- hpricot (LoadError)
Any ideas?
|
|
|
| Back to top |
|
 |
aslambilal
Joined: 28 Jun 2009 Posts: 3
|
Posted: Mon Jun 29, 2009 10:13 pm Post subject: |
|
|
Thanks for the help
Now then, do i need to change the require line? I still have the same error with jruby1.1 installed and the hpricot gem. |
|
| Back to top |
|
 |
Erno Mononen Posted via mailing list.
|
Posted: Tue Jun 30, 2009 2:09 pm Post subject: Ruby Hpricot |
|
|
aslambilal wrote:
| Quote: | Thanks for the help :)
Now then, do i need to change the require line? I still have the same error with jruby1.1 installed and the hpricot gem.
|
The require line should be fine; not sure now why you're still getting
that error. If you do
/usr/local/netbeans-6.5.1/ruby2/jruby-1.1.4/bin/jruby -S gem list hpricot
from the command line, what is the hpricot version it says you have
installed?
Erno |
|
| Back to top |
|
 |
aslambilal
Joined: 28 Jun 2009 Posts: 3
|
Posted: Tue Jun 30, 2009 8:27 pm Post subject: |
|
|
restarted my vm a few times and it worked all of a sudden. Idk why.
Thanks again  |
|
| 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
|
|
|
|