[jruby] trouble installing cucumber

85 views
Skip to first unread message

emilybache

unread,
Dec 8, 2009, 3:00:40 AM12/8/09
to Cukes
Hi,

I'm trying to install cucumber for jruby. I'm following these
instructions:

http://wiki.github.com/aslakhellesoy/cucumber/jruby-and-java

I have a JDK installed, and I have jruby and rake installed:

$ jruby --version
jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-03 rev 7996) [x86-
java]
[seemibac@SEL00173 /cygdrive/c/devtools]
$ jruby -S rake --version
rake, version 0.8.3

I'm on windows with cygwin. When I try to install cucumber, I get
this:

$ jruby -S gem install cucumber
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
IOError: An established connection was aborted by the software in
your host machine (http://gems.rubyforge.org/gems/cucumber-0.4.4.gem)

So I guess my corporate firewall is throwing a spanner in the works. I
downloaded cucumber from here

http://github.com/aslakhellesoy/cucumber/downloads

and unzipped it. Now I have a cucumber executable, but as soon as I
run it it says

$ ./cucumber
/usr/bin/env: ruby: No such file or directory

so clearly this cucumber doesn't know that I want it to run with
jruby. I tried to run the example as suggested, but that didn't work
either:

$ jruby -S cucumber features
C:/devtools/jruby-1.1.5/bin/cucumber:1: undefined method `cucumber'
for JRuby::Commands:Class (NoMethodError)


Please can someone help me to get my cucumber installation connected
to my jruby installation?

Emily

aslak hellesoy

unread,
Dec 8, 2009, 5:01:52 AM12/8/09
to cukes
Can you install other gems?

Aslak
> --
>
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
>
>

Emily Bache

unread,
Dec 8, 2009, 5:13:01 AM12/8/09
to cu...@googlegroups.com
Hi Aslak,

2009/12/8 aslak hellesoy <aslak.h...@gmail.com>:
> Can you install other gems?

yes, I think so:

$ jruby -S gem install sun_time
Successfully installed sun_time-0.0.1
1 gem installed
Installing ri documentation for sun_time-0.0.1...
Installing RDoc documentation for sun_time-0.0.1...

-Emily

Luis Lavena

unread,
Dec 8, 2009, 7:23:13 AM12/8/09
to cu...@googlegroups.com
On Tue, Dec 8, 2009 at 5:00 AM, emilybache <emily...@gmail.com> wrote:
> Hi,
>
> I'm trying to install cucumber for jruby. I'm following these
> instructions:
>
> http://wiki.github.com/aslakhellesoy/cucumber/jruby-and-java
>
> I have a JDK installed, and I have jruby and rake installed:
>
> $ jruby --version
> jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-03 rev 7996) [x86-
> java]
> [seemibac@SEL00173 /cygdrive/c/devtools]
> $ jruby -S rake --version
> rake, version 0.8.3
>
> I'm on windows with cygwin. When I try to install cucumber, I get
> this:
>
> $ jruby -S gem install cucumber
> ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
>    IOError: An established connection was aborted by the software in
> your host machine (http://gems.rubyforge.org/gems/cucumber-0.4.4.gem)
>
> So I guess my corporate firewall is throwing a spanner in the works. I
> downloaded cucumber from here
>
> http://github.com/aslakhellesoy/cucumber/downloads
>

Let's isolate one problem at a time.

Please start a normal Windows Command Prompt and try to install a Cucumber gem.

It worked from here:

C:\Users\Luis>jruby -S gem install cucumber

(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

(::) U P G R A D I N G (::)

Thank you for installing cucumber-0.4.4.
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
for important information about this release. Happy cuking!

(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

Successfully installed cucumber-0.4.4
1 gem installed

C:\Users\Luis>jruby -S cucumber --version
0.4.4

(calling cucumber --version also works)

> and unzipped it. Now I have a cucumber executable, but as soon as I
> run it it says
>
> $ ./cucumber
> /usr/bin/env: ruby: No such file or directory
>

The problem here is that jruby do not use shebangs but instead stick
to /usr/bin/env

What you're trying to accomplish is mix a native executable solution
with cygwin.

> so clearly this cucumber doesn't know that I want it to run with
> jruby. I tried to run the example as suggested, but that didn't work
> either:
>
> $ jruby -S cucumber features
> C:/devtools/jruby-1.1.5/bin/cucumber:1: undefined method `cucumber'
> for JRuby::Commands:Class (NoMethodError)
>

Would you mind update JRuby to a newer version? (like 1.4.0)?

> Please can someone help me to get my cucumber installation connected
> to my jruby installation?

Is more than just jruby with cucumber, is Jruby + cucumber wired through cygwin.

As I mentioned before, let's isolate individual issues and then see
where the problem lies.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Emily Bache

unread,
Dec 8, 2009, 8:40:42 AM12/8/09
to cu...@googlegroups.com
Hi,

I'm sorry I had an old version of jruby, I misread the page and
obviously thought 1.1.5 > 1.4.0 which was rather stupid of me. Anyway
I installed the newer version, and the problem is still there.

I get exactly the same error message from both cygwin and a dos prompt:

C:\devtools>jruby -v
jruby 1.4.0RC1 (ruby 1.8.7 patchlevel 174) (2009-09-30 80c263b) (Java HotSpot(TM
) Client VM 1.5.0_16) [x86-java]

C:\devtools>jruby -S gem install cucumber
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://jruby.kenai.com/pages/JRuby_Builtin_OpenSSL
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
IOError: An established connection was aborted by the software in your host
machine (http://gems.rubyforge.org/gems/cucumber-0.4.4.gem)

Anything else I should try?

Emily

Luis Lavena

unread,
Dec 8, 2009, 9:49:11 AM12/8/09
to cu...@googlegroups.com
Are you behind a HTTP proxy?

Can you check your browser settings?

If that is the case please use the --http-proxy option during gem installation.

George Dinwiddie

unread,
Dec 8, 2009, 11:16:42 AM12/8/09
to cu...@googlegroups.com
Hi, Emily,

emilybache wrote:
> $ jruby -S gem install cucumber
> ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
> IOError: An established connection was aborted by the software in
> your host machine (http://gems.rubyforge.org/gems/cucumber-0.4.4.gem)
>
> So I guess my corporate firewall is throwing a spanner in the works. I
> downloaded cucumber from here
>
> http://github.com/aslakhellesoy/cucumber/downloads
>
> and unzipped it.

Unzipped? Try running 'jruby -S gem install cucumber' in the directory
where you downloaded the gem.

- George

--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------

Emily Bache

unread,
Dec 9, 2009, 3:18:17 AM12/9/09
to cu...@googlegroups.com
Hi,

I don't have a proxy set in my browser, so I don't think that is the problem.

>> I downloaded cucumber from here
>>
>> http://github.com/aslakhellesoy/cucumber/downloads
>>
>> and unzipped it.
>
> Unzipped? Try running 'jruby -S gem install cucumber' in the directory
> where you downloaded the gem.

The file I dowloaded was a zip file, not a gem. jruby didn't seem to
take any notice of it, anyway. I get the same error message, whether
it is unzipped in the current working directory or not. I saw an error
message about openSSL as well, so I installed that, seemingly
successfully. See transcript below:

$ jruby -S gem install cucumber
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://jruby.kenai.com/pages/JRuby_Builtin_OpenSSL
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
IOError: An established connection was aborted by the software in
your host machine (http://gems.rubyforge.org/gems/cucumber-0.4.4.gem)
[seemibac@SEL00173 /cygdrive/c/devtools]
$ jruby -S gem install jruby-openssl
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://jruby.kenai.com/pages/JRuby_Builtin_OpenSSL
Successfully installed jruby-openssl-0.6
1 gem installed
Installing ri documentation for jruby-openssl-0.6...
Installing RDoc documentation for jruby-openssl-0.6...
[seemibac@SEL00173 /cygdrive/c/devtools]
$

Is there some way I can download the cucumber gem and install it locally?

Emily

George Dinwiddie

unread,
Dec 9, 2009, 8:56:31 AM12/9/09
to cu...@googlegroups.com, gemc...@googlegroups.com
Emily,

You can get 0.4.4 at
http://gems.rubyforge.vm.bytemark.co.uk/gems/cucumber-0.4.4.gem

Since Aslak moved to Gemcutter, there doesn't seem to be a way to
download the gems. This will be a significant issue for people trapped
behind corporate firewalls. I'm copying the gemcutter list in hopes of
starting a discussion about what the solution could be.

Until then, I'd guess you'll have to run rake on the contents of the zip
file and build your own gem.

- George

aidy lewis

unread,
Dec 9, 2009, 10:39:27 AM12/9/09
to cu...@googlegroups.com
Hi George,

Sorry if I am missing something, but can we not just add gemcutter as source?

Aidy

2009/12/9 George Dinwiddie <li...@idiacomputing.com>:

aslak hellesoy

unread,
Dec 9, 2009, 11:17:30 AM12/9/09
to cukes
On Wed, Dec 9, 2009 at 4:39 PM, aidy lewis <aidy....@googlemail.com> wrote:
> Hi George,
>
> Sorry if I am missing something, but can we not just add gemcutter as source?
>

Yes, all ruby developers should do that

gem install gemcutter && gem tumble

> Aidy
>
> 2009/12/9 George Dinwiddie <li...@idiacomputing.com>:
>> Emily,
>>
>> You can get 0.4.4 at
>> http://gems.rubyforge.vm.bytemark.co.uk/gems/cucumber-0.4.4.gem
>>
>> Since Aslak moved to Gemcutter,

Aslak, and the entire Ruby community. Rubyforge is no longer the
"official" gem host.

Luis Lavena

unread,
Dec 9, 2009, 11:17:56 AM12/9/09
to cu...@googlegroups.com
On Wed, Dec 9, 2009 at 5:18 AM, Emily Bache <emily...@gmail.com> wrote:
> Hi,
>
> I don't have a proxy set in my browser, so I don't think that is the problem.
>
>>> I downloaded cucumber from here
>>>
>>> http://github.com/aslakhellesoy/cucumber/downloads
>>>
>>> and unzipped it.
>>
>> Unzipped?  Try running 'jruby -S gem install cucumber' in the directory
>> where you downloaded the gem.
>
> The file I dowloaded was a zip file, not a gem. jruby didn't seem to
> take any notice of it, anyway. I get the same error message, whether
> it is unzipped in the current working directory or not. I saw an error
> message about openSSL as well, so I installed that, seemingly
> successfully. See transcript below:

The question is from where did you downloaded the file?
Did you updated your JRuby installation to something newer like 1.4.0?

There is no zip file offered at RubyForge:
http://rubyforge.org/frs/?group_id=797&release_id=41830

Could you provide the output of gem install with debug options?

jruby -S gem install cucumber --debug -V

And please do it from outside cygwin.

>
> Is there some way I can download the cucumber gem and install it locally?
>

The above provided link to RubyForge, but will fail since you don't
have any of the dependencies installed.

George Dinwiddie

unread,
Dec 9, 2009, 11:44:06 AM12/9/09
to cu...@googlegroups.com
Aidy,

My experience is that the gem protocol does not work through many
corporate firewalls. I don't know exactly why that is. The workaround
I've used in the past is to download the gem via http and install it
locally.

- George

aslak hellesoy

unread,
Dec 9, 2009, 11:51:34 AM12/9/09
to cukes
On Wed, Dec 9, 2009 at 5:44 PM, George Dinwiddie
<li...@idiacomputing.com> wrote:
> Aidy,
>
> My experience is that the gem protocol does not work through many
> corporate firewalls.  I don't know exactly why that is.  The workaround
> I've used in the past is to download the gem via http and install it
> locally.
>

There is a --http-proxy flag you can pass to rubygems. See gem help install

What has also worked for me with other tools is this:

export http_proxy=http://evil.enterprise.proxy:8090
(SET instead of export on Windows)

(not sure if rubygems picks that up though)

If this still doesn't work, please move the discussion over to the
rubygems mailing list. I don't see how this is Cucumber-specific.

Aslak

Luis Lavena

unread,
Dec 9, 2009, 11:57:33 AM12/9/09
to cu...@googlegroups.com
On Wed, Dec 9, 2009 at 1:17 PM, aslak hellesoy <aslak.h...@gmail.com> wrote:
> On Wed, Dec 9, 2009 at 4:39 PM, aidy lewis <aidy....@googlemail.com> wrote:
>> Hi George,
>>
>> Sorry if I am missing something, but can we not just add gemcutter as source?
>>
>
> Yes, all ruby developers should do that
>
> gem install gemcutter && gem tumble
>

gem tumble is no needed anymore:

http://groups.google.com/group/gemcutter/browse_thread/thread/b803cb3d1277515a

gems.rubyforge.org is now Gemcutter, newer 1.3.x versions of RubyGems
should work out of the box with the new scenario.

People running old versions of RubyGems should perform an upgrade to
1.3.x line. Either using the distribution package manager (Ubuntu,
debian, etc), the bundled version (JRuby) or manually.

Emily Bache

unread,
Dec 10, 2009, 5:16:15 AM12/10/09
to cu...@googlegroups.com
Hi,

I think this is a cucumber problem not a general gem problem, since I
can sucessfullly install other gems. I am also not convinced it is my
corporate firewall that is at fault. I do not need a proxy to access
the internet, for example.

I used DOS and set the --debug flag as Luis suggested, and noticed the
first error message was that I didn't have test-unit installed, so I
installed that separately. When I then re-ran the cucumber install,
the first error message about test-unit vanished, but the rest was the
same.

Does the output below help at all in diagnosing the problem?

Emily

C:\devtools>jruby -S gem install test-unit
Successfully installed test-unit-2.0.5
1 gem installed
Installing ri documentation for test-unit-2.0.5...
Installing RDoc documentation for test-unit-2.0.5...

C:\devtools>jruby -S gem install cucumber --debug -V
Exception `Gem::LoadError':RubyGem version error: sources(0.0.1 not > 0.0.1)
at C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems.rb:827 - #
<Gem::LoadError:0x4276fd>
GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz
GET 200 OK: http://gems.rubyforge.org/specs.4.8.gz
Exception `Gem::RemoteFetcher::FetchError':SystemCallError: Unknown error - An e
stablished connection was aborted by the software in your host machine (http://g
ems.rubyforge.org/quick/Marshal.4.8/term-ansicolor-1.0.4.gemspec.rz) at C:/devto
ols/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:172
- #<Gem::RemoteFetcher::FetchError:0x1d2a83>
Error fetching remote data: SystemCallError: Unknown error - An esta
blished connection was aborted by the software in your host machine (http://gems
.rubyforge.org/quick/Marshal.4.8/term-ansicolor-1.0.4.gemspec.rz)
Falling back to local-only install
Installing gem cucumber-0.4.4
Downloading gem cucumber-0.4.4.gem
Exception `Gem::RemoteFetcher::FetchError':IOError: An established connection wa
s aborted by the software in your host machine (http://gems.rubyforge.org/gems/c
ucumber-0.4.4.gem) at C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/r
ubygems/remote_fetcher.rb:172 - #<Gem::RemoteFetcher::FetchError:0x1089f72>
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
IOError: An established connection was aborted by the software in your host
machine (http://gems.rubyforge.org/gems/cucumber-0.4.4.gem)
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/remote
_fetcher.rb:172:in `fetch_path'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/remote
_fetcher.rb:108:in `download'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/depend
ency_installer.rb:232:in `install'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/depend
ency_installer.rb:222:in `each'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/depend
ency_installer.rb:222:in `install'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/comman
ds/install_command.rb:118:in `execute'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/comman
ds/install_command.rb:115:in `each'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/comman
ds/install_command.rb:115:in `execute'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/comman
d.rb:257:in `invoke'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/comman
d_manager.rb:132:in `process_args'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/comman
d_manager.rb:102:in `run'
C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/gem_ru
nner.rb:58:in `run'
C:/devtools/jruby-1.4.0RC1/bin/../bin/gem:24
Exception `Gem::SystemExitException':Exiting RubyGems with exit_code 1 at C:/dev
tools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb:
265 - #<Gem::SystemExitException:0x39b72d>

C:\devtools>

Matt Wynne

unread,
Dec 10, 2009, 5:22:51 AM12/10/09
to cu...@googlegroups.com

On 10 Dec 2009, at 10:16, Emily Bache wrote:

> Hi,
>
> I think this is a cucumber problem not a general gem problem, since I
> can sucessfullly install other gems. I am also not convinced it is my
> corporate firewall that is at fault. I do not need a proxy to access
> the internet, for example.
>
> I used DOS and set the --debug flag as Luis suggested, and noticed the
> first error message was that I didn't have test-unit installed, so I
> installed that separately. When I then re-ran the cucumber install,
> the first error message about test-unit vanished, but the rest was the
> same.
>
> Does the output below help at all in diagnosing the problem?
>
> Emily
>
> C:\devtools>jruby -S gem install test-unit
> Successfully installed test-unit-2.0.5
> 1 gem installed
> Installing ri documentation for test-unit-2.0.5...
> Installing RDoc documentation for test-unit-2.0.5...
>
> C:\devtools>jruby -S gem install cucumber --debug -V
> Exception `Gem::LoadError':RubyGem version error: sources(0.0.1 not
> > 0.0.1)
> at C:/devtools/jruby-1.4.0RC1/bin/../lib/ruby/site_ruby/1.8/
> rubygems.rb:827 - #
> <Gem::LoadError:0x4276fd>

This looks like it might be a rubygems problem. I can't recall from
the rest of the thread - have you updated rubygems?

jruby -S gem update --system
> --
>
> You received this message because you are subscribed to the Google
> Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en
> .
>
>

cheers,
Matt

+447974 430184
ma...@mattwynne.net
http://mattwynne.net

Luis Lavena

unread,
Dec 10, 2009, 10:43:44 AM12/10/09
to cu...@googlegroups.com
On Thu, Dec 10, 2009 at 7:16 AM, Emily Bache <emily...@gmail.com> wrote:
> Hi,
>
> I think this is a cucumber problem not a general gem problem, since I
> can sucessfullly install other gems. I am also not convinced it is my
> corporate firewall that is at fault. I do not need a proxy to access
> the internet, for example.
>

Well, here is the situation:

I've tested 1.4.0 version of JRuby, from Windows, without having any
gem installed, and gem installation of cucumber worked.

> I used DOS and set the --debug flag as Luis suggested, and noticed the
> first error message was that I didn't have test-unit installed, so I
> installed that separately. When I then re-ran the cucumber install,
> the first error message about test-unit vanished, but the rest was the
> same.

--debug will expose all the internal and captured errors, the ones
that matters are the ones at the end of the list:

> Does the output below help at all in diagnosing the problem?
>

Why did you upgrade to 1.4.0RC1 when 1.4.0 has been released for quite
some time?

Can you include information of your PATH?
(echo %PATH%)

And also what information "jruby -S gem env" reports?

byrnejb

unread,
Dec 10, 2009, 11:20:24 AM12/10/09
to Cukes


On Dec 9, 10:39 am, aidy lewis <aidy.le...@googlemail.com> wrote:
> Hi George,
>
> Sorry if I am missing something, but can we not just add gemcutter as source?
>
> Aidy

Gemcutter uses amazon's s3 as storage. Webwasher treats this as a
blocked source by default. This means that a lot of people behind
corporate nanny-walls cannot install or update gems unless the
download through an non-blocked channel. Webwasher also blocks most
of the public and pay-for-service proxies so that route is generally
closed as well.
Reply all
Reply to author
Forward
0 new messages