Install Cucumber into JRuby is failing

223 views
Skip to first unread message

Sindhur

unread,
Oct 14, 2009, 3:53:30 AM10/14/09
to Cukes
Hi,

I am Sindhur, am working for SunGard. I am a newbie to cucumber i just
want to insatll/configure it and try how things works.

I followed the instructions given in this link -
http://wiki.github.com/aslakhellesoy/cucumber/jruby-and-java


wheni am tring to run the command "jruby -S gem install cucumber" it
throws the following error:

D:\Program Files\jruby-1.3.1\bin>jruby -S gem install cucumber
JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
ERROR: While executing gem ... (IOError)
The filename, directory name, or volume label syntax is incorrect

Can any one of you help in this.

Waiting for your reply.

Thanks and Regards,
Sindhur

aslak hellesoy

unread,
Oct 14, 2009, 7:49:08 AM10/14/09
to cu...@googlegroups.com
To debug this I first did:

jruby -S gem update --system

Then I ran:

jruby -S gem install cucumber --backtrace

If you edit your
C:/jruby-1.3.1/lib/ruby/site_ruby/1.8/rubygems/installer.rb file with
some additional debug info around line 541 with:

begin
File.open(path, "wb") do |out|
out.write file_data
end
rescue IOError => e
e.message << "\nCouldn't write to " + path
raise e
end

Then you'll see a backtrace like this:

ERROR: While executing gem ... (IOError)
The filename, directory name, or volume label syntax is incorrect
Couldn't write to
C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/cucumber-0.4.0/examples/i18n/tr/features/bo?lme.feature
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/installer.rb:541:in
`open'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/installer.rb:541:in
`extract_files'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/installer.rb:521:in
`each'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/installer.rb:521:in
`extract_files'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/installer.rb:217:in
`install'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:252:in
`install'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:222:in
`each'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:222:in
`install'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:118:in
`execute'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in
`each'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in
`execute'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in
`invoke'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in
`process_args'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in
`run'
C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in
`run'
C:/jruby-1.3.1/bin/../bin/gem:24

Your operating system doesn't know how to write a file with latin
characters in it. (The name of the file is bölme.feature, which is
division.feature in Turkish).

Does anyone know how to train this operating system to write such
files, or do we have to rename all non-ascii files (currently only one
afaik) to accomodate for it?

Aslak

aslak hellesoy

unread,
Oct 14, 2009, 9:04:15 AM10/14/09
to cu...@googlegroups.com
Actually - this works on jruby 1.3.1 On Windows XP:

File.open("bölme.feature", "wb") do |out|
out.write "ÆØÅ"
end

So it sounds like a combination of JRuby/Windows/Rubygems/UTF-8.
I have no idea why this simple script works, but Rubygems installation doesn't.

Any suggestions about how to address this?

Aslak

Stephen Eley

unread,
Oct 14, 2009, 11:02:48 AM10/14/09
to cu...@googlegroups.com
On Wed, Oct 14, 2009 at 9:04 AM, aslak hellesoy
<aslak.h...@gmail.com> wrote:
>
> Any suggestions about how to address this?

If it's only one file, and i18n within _filenames_ (as opposed to file
content) isn't considered a critical feature, renaming the file seems
sort of obvious.


--
Have Fun,
Steve Eley (sfe...@gmail.com)
ESCAPE POD - The Science Fiction Podcast Magazine
http://www.escapepod.org

aslak hellesoy

unread,
Oct 14, 2009, 11:43:48 AM10/14/09
to cu...@googlegroups.com
On Wed, Oct 14, 2009 at 5:02 PM, Stephen Eley <sfe...@gmail.com> wrote:
>
> On Wed, Oct 14, 2009 at 9:04 AM, aslak hellesoy
> <aslak.h...@gmail.com> wrote:
>>
>> Any suggestions about how to address this?
>
> If it's only one file, and i18n within _filenames_ (as opposed to file
> content) isn't considered a critical feature, renaming the file seems
> sort of obvious.
>

Yeah, probably easier than waiting for Windows to be fixed :-/

Sigh

Aslak

Jim Meyer

unread,
Oct 14, 2009, 11:50:57 AM10/14/09
to cu...@googlegroups.com
On 10/14/09 8:43 AM, aslak hellesoy wrote:
>
> On Wed, Oct 14, 2009 at 5:02 PM, Stephen Eley<sfe...@gmail.com> wrote:
>>
>> On Wed, Oct 14, 2009 at 9:04 AM, aslak hellesoy
>> <aslak.h...@gmail.com> wrote:
>>>
>>> Any suggestions about how to address this?
>>
>> If it's only one file, and i18n within _filenames_ (as opposed to file
>> content) isn't considered a critical feature, renaming the file seems
>> sort of obvious.
>
> Yeah, probably easier than waiting for Windows to be fixed :-/
>
> Sigh

I know how you feel. It's moments like these I take refuge in Postel's
Law (http://en.wikipedia.org/wiki/Postel%27s_law):

Be conservative in what you do; be liberal in what you accept from
others.

It's cold comfort to be the one forced to 'make it work' but it's almost
always the right choice.

--j

Tim Uttormark

unread,
Oct 14, 2009, 11:56:43 AM10/14/09
to Cukes
As detailed in another thread (which this thread duplicated),
there are actually two files with problematic filenames:
examples\i18n\tr\features\bölme.feature
examples\i18n\tr\features\step_definitons
\hesap_makinesi_adımları.rb

aslak hellesoy

unread,
Oct 14, 2009, 12:04:38 PM10/14/09
to cu...@googlegroups.com
Thanks Tim - both are now moved.

I really can't think of any other good reasons to use Windows than:
* My employer twists my arm to do it
* I'm doing some weird .NET that doesn't run on Mono

Sorry, had to bitch >:)

Aslak

> >
>

Stephen Eley

unread,
Oct 14, 2009, 12:49:45 PM10/14/09
to cu...@googlegroups.com
On Wed, Oct 14, 2009 at 12:04 PM, aslak hellesoy
<aslak.h...@gmail.com> wrote:
>
> I really can't think of any other good reasons to use Windows than:
> * My employer twists my arm to do it
> * I'm doing some weird .NET that doesn't run on Mono

* The "developer" (I use that term loosely) before me built a large
and complex Web site entirely on bad ASP and Microsoft Access (!!),
and I'm needing to maintain some legacy data in that system until my
rebuilding is complete.

I wish this was a hypothetical.

Tim Uttormark

unread,
Oct 14, 2009, 1:16:46 PM10/14/09
to Cukes

> I really can't think of any other good reasons to use Windows than:
> * My employer twists my arm to do it
> * I'm doing some weird .NET that doesn't run on Mono

Unfortunately I fall into category #1.

Until there is a 0.4.1 release, how do those affected by this problem
install the gem? "gem install cucumber --prerelease" ?

Sindhur

unread,
Oct 15, 2009, 5:37:09 AM10/15/09
to Cukes
Hi All,

I don't have the mentioned files in the location - 1.8\gems
\cucumber-0.4.0\examples\i18n\tr\features the features folder is
empty.

Thanks
Sindhur

aslak hellesoy

unread,
Oct 15, 2009, 5:46:04 AM10/15/09
to cu...@googlegroups.com
On Thu, Oct 15, 2009 at 11:37 AM, Sindhur <sindh...@gmail.com> wrote:
>
> Hi All,
>
> I don't have the mentioned files in the location - 1.8\gems
> \cucumber-0.4.0\examples\i18n\tr\features the features folder is
> empty.
>

That's probably because your install failed to install them. Isn't
that what your problem was in the first place? Try 0.4.2 instead.

Sindhur

unread,
Oct 15, 2009, 6:14:37 AM10/15/09
to Cukes
Hi,

As you said 0.4.2 worked fine. Can you tell me how to run a example?

i tried to run the command - "jruby -S cucumber division.feature" but
it says the following error:

'jruby' is not recognized as an internal or external command,
operable program or batch file.

Can you tell me what could be the problem?

Thanks
Sindhur

On Oct 15, 2:46 pm, aslak hellesoy <aslak.helle...@gmail.com> wrote:

aslak hellesoy

unread,
Oct 15, 2009, 6:41:01 AM10/15/09
to cu...@googlegroups.com
On Thu, Oct 15, 2009 at 12:14 PM, Sindhur <sindh...@gmail.com> wrote:
>
> Hi,
>
> As you said 0.4.2 worked fine. Can you tell me how to run a example?
>
> i tried to run the command - "jruby -S cucumber division.feature" but
> it says the following error:
>
> 'jruby' is not recognized as an internal or external command,
> operable program or batch file.
>

Can you run "jruby --version" ?
If not you have to put it on your PATH

Aslak
Message has been deleted

Sindhur

unread,
Oct 15, 2009, 7:58:34 AM10/15/09
to Cukes
Thanks Aslak after adding to environment variables it worked.

Thanks
Sindhur

On Oct 15, 3:41 pm, aslak hellesoy <aslak.helle...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages