Hi Yoko,

Can you tell me the steps to build a Pure Java Nokogiri gem? The
instructions you put on your blog are outdated:

$ git clone git://github.com/tenderlove/nokogiri.git
$ cd nokogiri
$ git checkout -b java origin/java
(use C Ruby for following two commands)
$ sudo gem install racc rexical rake-compiler hoe
$ rake gem:dev:spec
$ jruby -S rake java:gem

Thanks!
Lee

On Wed, Jul 20, 2011 at 8:57 PM, Shih-gian Lee <shih....@gmail.com> wrote:

> Well, I managed to run the test without any problems after installing
> nokogiri gem. But, I thought container.setLoadPaths(); suppose to take care
> of that without requiring me to install the gem. The console outputs the
> following information after I ran the test successfully:
>
> /Users/sglee77/work/git/nokogiri/test/helper.rb:10: version info:
> {"warnings"=>[], "nokogiri"=>"1.5.0", "ruby"=>{"version"=>"1.8.7",
> "platform"=>"java", "description"=>"jruby 1.7.0.dev (ruby-1.8.7-p330)
> (2011-07-18 fffffff) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26)
> [darwin-x86_64-java]", "engine"=>"jruby", "jruby"=>"1.7.0.dev"}}
>
> I don't remember I had to install the nokogiri gem in order to pick up the
> helper. Weird.
>
> On Wed, Jul 20, 2011 at 8:13 PM, Shih-gian Lee <shih....@gmail.com> wrote:
>
>> Hi Yoko,
>>
>> I found out that this line of code -
>> container.getProvider().getRubyInstanceConfig().setDebug(true); caused the
>> rubygems and other libraries load to fail. After I commented out that line
>> of code, most of the error went away except the load error for
>> nokogiri/css/parser:
>>
>> /Users/sglee77/work/git/nokogiri/lib/nokogiri/css.rb:3 warning: global
>> variable `$-w' not initialized
>>
>> LoadError: no such file to load -- nokogiri/css/parser
>>
>>   require at org/jruby/RubyKernel.java:1037
>>
>>   require at
>> /Users/sglee77/work/git/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
>>
>>    (root) at /Users/sglee77/work/git/nokogiri/lib/nokogiri/css.rb:5
>>
>>   require at org/jruby/RubyKernel.java:1037
>>
>>   require at /Users/sglee77/work/git/nokogiri/lib/nokogiri/css.rb:36
>>
>>    (root) at /Users/sglee77/work/git/nokogiri/lib/nokogiri.rb:34
>>
>>   require at org/jruby/RubyKernel.java:1037
>>
>>   require at /Users/sglee77/work/git/nokogiri/lib/nokogiri.rb:36
>>
>>    (root) at /Users/sglee77/work/git/nokogiri/test/helper.rb:8
>>
>>   require at org/jruby/RubyKernel.java:1037
>>
>>   require at /Users/sglee77/work/git/nokogiri/test/helper.rb:36
>>
>>    (root) at <script>:1
>>
>> Exception in thread "main" org.jruby.embed.EvalFailedException:
>> (LoadError) no such file to load -- nokogiri/css/parser
>>
>> at org.jruby.embed.internal.EmbedEvalUnitImpl.run(
>> EmbedEvalUnitImpl.java:127)
>>
>> at org.jruby.embed.ScriptingContainer.runUnit(
>> ScriptingContainer.java:1233)
>>
>> at org.jruby.embed.ScriptingContainer.runScriptlet(
>> ScriptingContainer.java:1226)
>>
>> at canna.JavaToRubyTestRunner.<init>(JavaToRubyTestRunner.java:26)
>>
>> at canna.JavaToRubyTestRunner.main(JavaToRubyTestRunner.java:60)
>>
>> Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file
>> to load -- nokogiri/css/parser
>>
>> I will try to troubleshoot some more. If you happen to know the answer,
>> please let me know.
>>
>> Thanks,
>> Lee
>>
>> On Wed, Jul 20, 2011 at 1:54 PM, Shih-gian Lee <shih....@gmail.com>wrote:
>>
>>> Hi Yoko,
>>>
>>> Yes, I would like to run Nokogiri's test to help out with Nokogiri issue
>>> (I have some time again:)). This is my complete source -
>>> https://gist.github.com/1095486 with stacktrace -
>>> https://gist.github.com/1095483
>>>
>>> I am puzzled by the following exception: LoadError: no such file to load
>>> -- nokogiri/css/parser
>>>
>>> Thanks in advance for your help!
>>>
>>> - Lee
>>>
>>>
>>> On Wed, Jul 20, 2011 at 1:29 PM, Yoko Harada <yoko...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> You have "Exception `LoadError' at org/jruby/RubyKernel.java:1037 - no
>>>> such file to load -- helper" in your exception stack trace. You want
>>>> to run Nokogiri's tests, right? Then, you need to load Nokoigiri's
>>>> helper.rb, too.
>>>>
>>>> Hope this helps,
>>>> -Yoko
>>>>
>>>> On Wed, Jul 20, 2011 at 8:33 AM, Shih-gian Lee <shih....@gmail.com>
>>>> wrote:
>>>> > I forgot to include environment information. I am running Mac OSX Snow
>>>> > Leopard in Eclipse Indigo. Thanks!
>>>> > On Wed, Jul 20, 2011 at 8:21 AM, Shih-gian Lee <shih....@gmail.com>
>>>> wrote:
>>>> >>
>>>> >> Hi All,
>>>> >> I am trying to use RedBridge to troubleshoot a Nokogiri issue. I
>>>> found out
>>>> >> that RedBridge failed to load JRuby gems for some reason. Here is the
>>>> simple
>>>> >> code to load RubyGems without all the unnecessary noise
>>>> >> - http://pastie.org/2242475. The stacktrace that I am getting is
>>>> here
>>>> >> - http://pastie.org/2242502.
>>>> >> I am pulling the latest JRuby (1.7.0) from Github. Any help from the
>>>> >> community is much appreciated!
>>>> >> Regards,
>>>> >> Lee
>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>
>

Reply via email to