Newbe: rails version issue

I am evaluating RubyMine but am getting the following rake issue...

C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can't find
executable
rake for rake-0.8.7 (Gem::Exception)

There are many web pages (through Google) that discuss this, and several
recommend applying a patch and link to a .patch file
(0001-version-bundled-gems-during-installation.patch). This file opens
in TortoiseUDiff but the problem is...

How to apply the patch?

Everyone seems to assume that the world and his dog actually know how to
apply the patch and yet I guess there must be many Newbies like me that
have no idea.

I am an experienced and seasoned developer but totally new to Ruby.

Any help gratefully accepted.

Kind Regards
Steve

I havent use rubymine, but please try using th console to see if it is a rubymine issue, if is not, i can help you if you post the output form the console when you try run the rake tast. Also try calling rake with --trace at the end to get more info on the error.

Thanks for the reply. Here's a console example...

Running rake --help --trace doesn't produce anything extra (presumably
because rake itself is not being executed).

So now I've run out of ideas :frowning:

Kind Regards
Steve

Is this your only ruby in the system? run gem environment to see where
are your gems been installed.

go to the directory where rake is and try running it from there to see
if there is a problem in your path(the windows environment variable)

OK. I checked these things.

gem environment says:-

Steve, were you able to find a solution for this? I am dealing with
the same exact error. It says rake-0.8.7 installed fine but I get an
error that it can't find the executable.

Thanks,

Kevin

Hi Kevin.

In the end I uninstalled Ruby 1.9.2 and installed version 1.9.1 and the
problem went away.

Kind Regards
Steve

If you are going to develop in Rails3, I don’t think Ruby 1.9.1 is compatible

Jason

Steve Mills wrote in post #955083:

Hi Kevin.

In the end I uninstalled Ruby 1.9.2 and installed version 1.9.1 and the
problem went away.

Kind Regards
Steve

Bad idea. Ruby 1.9.1 is not supposed to work reliably with Rails. Use
1.9.2 or 1.8.7.

Best,

Marnen Laibow-Koser wrote in post #955129:

Bad idea. Ruby 1.9.1 is not supposed to work reliably with Rails. Use
1.9.2 or 1.8.7.

1.9.2 doesn't work. 1.8.7 is too old to work with the tools I'm using.
So far 1.9.1 is working with no problems.

Like the person before me, I tried to get help as to why things didn't
work with 1.9.2 and got no answers. As I only have a limited time
available, I have to figure something that works and so far I've had no
problems with 1.9.1.

However, I would like to use 1.9.2 if only it would work and there seems
to be some big problems there.

There are patches available to fix it but the authors assume that we all
know how to apply a patch whereas newbies like myself haven't a clue -
yes we can download the patch, but we don't know how to apply it.

Any hints? :slight_smile:

Kind Regards
Steve

Steve Mills wrote in post #955200:
[...]

There are patches available to fix it but the authors assume that we all
know how to apply a patch whereas newbies like myself haven't a clue -
yes we can download the patch, but we don't know how to apply it.

Any hints? :slight_smile:

Learn how to apply a patch. ("man patch" would be helpful if you were
on a *nix system; I'm not sure how to do it on Windows, though Google
might help. But Windows isn't great for Rails anyway; get a *nix VM if
nothing else.)

That wasn't meant to be snarky: this is a fairly basic system
maintenance task. If you can point me to a patch you've found, I may be
able to be of more help.

Kind Regards
Steve

Best,

Marnen Laibow-Koser wrote in post #955209:

Steve Mills wrote in post #955200:
[...]
If you can point me to a patch you've found, I may be
able to be of more help.

Thanks - I'm working both in Windows and Ubuntu - but Windows primarily
because that's where my Development Environment is - Ubuntu is just for
learning.

The patch was...

0001-version-bundled-gems-during-installation.patch

Kind Regards
Steve

P.S. I should also have mentioned I'm working with RubyMine to learn how
to build Rails web apps.

Steve Mills wrote in post #955213:

Marnen Laibow-Koser wrote in post #955209:

Steve Mills wrote in post #955200:
[...]
If you can point me to a patch you've found, I may be
able to be of more help.

Thanks - I'm working both in Windows and Ubuntu - but Windows primarily
because that's where my Development Environment is

Then move it. :slight_smile:

- Ubuntu is just for
learning.

The patch was...

0001-version-bundled-gems-during-installation.patch

I didn't mean the filename...I meant the content.

Kind Regards
Steve

Best,

Steve Mills wrote in post #955214:

P.S. I should also have mentioned I'm working with RubyMine to learn how
to build Rails web apps.

Drop RubyMine, at least for now. You can go back to it later, but you
should absolutely not be using an IDE for learning Rails. Just work
with a good text editor (I like KomodoEdit) and a bunch of terminal
windows.

Best,

The content was...

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 266d717..0e9f39a 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -515,7 +515,7 @@ install?(:ext, :comm, :gem) do
     version = open(src) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~
s}} or next
     version = version.split(%r"=\s*", 2)[1].strip[/\A([\'\"])(.*?)\1/,
2]
     puts "#{" "*30}#{name} #{version}"
- open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode)
do
+ open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"),
$data_mode) do
       <<-GEMSPEC
Gem::Specification.new do |s|
   s.name = #{name.dump}

Steve Mills wrote in post #955220:

The content was...

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 266d717..0e9f39a 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -515,7 +515,7 @@ install?(:ext, :comm, :gem) do
     version = open(src) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~
s}} or next
     version = version.split(%r"=\s*", 2)[1].strip[/\A([\'\"])(.*?)\1/,
2]
     puts "#{" "*30}#{name} #{version}"
- open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode)
do
+ open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"),
$data_mode) do
       <<-GEMSPEC
Gem::Specification.new do |s|
   s.name = #{name.dump}

Then you probably want to use Git to apply it -- check out the docs for
git-apply.

Best,

Unfortunately, I'm such a newbie to this, I don't have git, don't see
why I need it when I use subversion for version control, and it doesn't
get automatically installed with Ruby.

The information that led me to this patch was Ruby's inability to
recognise that Rake 0.8.7 had been installed. Apparently some file
somewhere is pointing gem at some other version.

Gem install of rake 0.8.7 says it has installed that version but when
you try and run rake it says that version 0.8.7 is required and not
present.

It's a pity that the only real clue is this patch and that someone
couldn't readily say what file is at fault and how to edit it.

I'll install git and investigate further if and when I find something
that doesn't work with 1.9.1. Meanwhile I think it's poor that 1.9.2 was
released with such a major bug that rake doesn't work.

Here I am trying to decide whether or not ruby on rails is as good as
everyone makes out, and whether to adopt it and invest a great deal of
time in it, and I'm put off by such hurdles at the very first step.

I'm also learning .NET which has a lot going for it, but my web host
doesn't support .NET and does support Ruby on Rails hence my interest in
it.

Thanks very much for persisting with this issue and pushing me in the
right direction :slight_smile:

Kind Regards
Steve

Steve Mills wrote in post #955228:

Unfortunately, I'm such a newbie to this, I don't have git,

Then get it.

don't see
why I need it when I use subversion for version control,

Because it's a better VCS than Subversion is. Subversion uses a less
powerful paradigm (centralized, whereas Git is decentralized) and has no
real merging algorithm, which makes branching and merging needlessly
difficult.

See http://www.whygitisbetterthanx.com for more details. I don't want
to hijack this thread.

and it doesn't
get automatically installed with Ruby.

So?

[...]

It's a pity that the only real clue is this patch and that someone
couldn't readily say what file is at fault and how to edit it.

The patch says exactly that. That's what a patchfile is: a
representation of what changes get made where.

For

I'll install git

You don't need to *for this patch*. See my last post: you don't need
git to apply the patch. Just use the patch command.

(But you should install git for development in general.)

and investigate further if and when I find something
that doesn't work with 1.9.1. Meanwhile I think it's poor that 1.9.2 was
released with such a major bug that rake doesn't work.

I don't think that's a 1.9.2 bug, but I could be wrong. I believe it's
a Rake issue.

Here I am trying to decide whether or not ruby on rails is as good as
everyone makes out, and whether to adopt it and invest a great deal of
time in it, and I'm put off by such hurdles at the very first step.

You can use Ruby 1.8.7 if you'd rather.

But everything in Rails development is harder on Windows, or so I'm told
(I personally stay as far away from Windows as I can).

[Repost of something that apparently got eaten.]

Marnen Laibow-Koser wrote in post #955224:

Steve Mills wrote in post #955220:

The content was...

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 266d717..0e9f39a 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -515,7 +515,7 @@ install?(:ext, :comm, :gem) do
     version = open(src) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~
s}} or next
     version = version.split(%r"=\s*", 2)[1].strip[/\A([\'\"])(.*?)\1/,
2]
     puts "#{" "*30}#{name} #{version}"
- open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode)
do
+ open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"),
$data_mode) do
       <<-GEMSPEC
Gem::Specification.new do |s|
   s.name = #{name.dump}

Then you probably want to use Git to apply it -- check out the docs for
git-apply.

No, on second thought, you don't need Git to apply the patch. Just use
the patch command as I explained earlier.