
| View previous topic :: View next topic |
| Author |
Message |
E M Recio Posted via mailing list.
|
Posted: Wed Feb 11, 2009 12:16 am Post subject: NB 6.5, OS/X, Rails Gem Version error |
|
|
I am getting the following error message when I attempt to start WEBRick:
Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update
your RAILS_GEM_VERSION setting in config/environment.rb for the Rails
version you do have installed, or comment out RAILS_GEM_VERSION to use
the latest version installed.
I tried commenting out the RAILS_GEM_VERSION and it doesn't do
_anything_ at all. The problem is that I can start the application via
the command line just fine. I am not using jRuby, but instead compiled
and installed my own version of Ruby, Gem, and Rails into /usr/local/
and am using that pathing for all the tools (at least on commandline - I
don't know if Netbeans is ignoring the PATH).
On my Linux box the same source tree works fine and runs WEBRick. I saw
the following message, BUT where is ruby2/rake_tasks_info.rb I only have
an executable file on the Mac:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/66e1d63500831760
"I've noticed a similar problem with 6.5M and 6.5Beta. My problem
turned out to be a NetBeans call to Rake that was failing. I've filed
with Sun-NetBeansDev, issue 149201.
My problem was in NetBeans source ruby2/rake_tasks_info.rb. On line 9
of that file is a call to "do_option" method on rake. This method
appears to exist in rake v0.7.? but not in v0.8.? and rake v0.8.3 is
the one that's currently shipping.
I just commented out line 9 in the NB file and all (appears to) work
fine." |
|
| Back to top |
|
 |
E M Recio Posted via mailing list.
|
Posted: Wed Feb 11, 2009 1:35 am Post subject: NB 6.5, OS/X, Rails Gem Version error |
|
|
E M Recio wrote:
| Quote: | I am getting the following error message when I attempt to start WEBRick:
Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update
your RAILS_GEM_VERSION setting in config/environment.rb for the Rails
version you do have installed, or comment out RAILS_GEM_VERSION to use
the latest version installed.
I tried commenting out the RAILS_GEM_VERSION and it doesn't do
_anything_ at all. The problem is that I can start the application via
the command line just fine. I am not using jRuby, but instead compiled
and installed my own version of Ruby, Gem, and Rails into /usr/local/
and am using that pathing for all the tools (at least on commandline - I
don't know if Netbeans is ignoring the PATH).
|
So I think I figured it out, after working on this for hours, sure
enough after sending a message, I figure out what it was. So:
gem list
Was returning rake 0.8.3 (among the other components installed).
I decided to go and "Migrate to current version" anyway (after just
finishing installing MySQL to see if maybe that's why it wasn't running)
and I got a more descriptive error message/dialog box. It said that the
version of Rake installed was not compatible.
I went to Tools -> ruby gems and saw that it could not find Rake. So I
decided to do a command line install of rake just to overwrite what's
there, which is when I noticed that it started to install it into
"~/.gems" because I was running it as my own user and not root.
The problem was that on command line, it was going into my ~/.gems to
get the missing packages, whereas Netbeans was getting it from
/usr/local. I "rm -rf ~/.gems" and did a "sudo gem install rake" and
everything was installed in its proper location under /usr/local
Hope this helps someone else out there.
-elmo |
|
| Back to top |
|
 |
Chris Kutler Posted via mailing list.
|
Posted: Wed Feb 11, 2009 3:54 pm Post subject: NB 6.5, OS/X, Rails Gem Version error |
|
|
You make some good points for newbies to remember -- In the default set
up, the gems repository for your Ruby installation will be different
from the gems repository for your JRuby installation.
Here are some things a newbie should also know:
To see where your repositories are, choose Tools > Ruby Platforms and
select each platform in turn. You can see the paths on the right.
To see what is installed in installed in a repository, choose Tools >
Ruby Gems and select the desired platform. This manager also shows the
path to the repository. In this case, when you got the error message
about the missing Rails 2.1.1 gem, you could have popped open the Gems
Manager and looked to see if it was installed, and if not, install it
(or alternatively set the RAILS_GEM_VERSION setting in the
environment.rb file to the version of a Rails gem that the Gems Manager
shows is installed).
Be careful about using the Ruby gem command to install a gem into your
JRuby repository. JRuby is not compatible with gems that use native
extensions. If you install a gem into your JRuby repository using "sudo
jruby -S gem install rake" and that gem uses native extensions, then it
will show an error. If you install a gem into your JRuby repository
using the Ruby gem command, it won't emit an error and later you will
run into trouble using that gem in a JRuby application.
E M Recio wrote:
| Quote: | E M Recio wrote:
| Quote: | I am getting the following error message when I attempt to start
WEBRick:
Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`,
update your RAILS_GEM_VERSION setting in config/environment.rb for
the Rails version you do have installed, or comment out
RAILS_GEM_VERSION to use the latest version installed.
I tried commenting out the RAILS_GEM_VERSION and it doesn't do
_anything_ at all. The problem is that I can start the application
via the command line just fine. I am not using jRuby, but instead
compiled and installed my own version of Ruby, Gem, and Rails into
/usr/local/ and am using that pathing for all the tools (at least on
commandline - I don't know if Netbeans is ignoring the PATH).
|
So I think I figured it out, after working on this for hours, sure
enough after sending a message, I figure out what it was. So:
gem list
Was returning rake 0.8.3 (among the other components installed).
I decided to go and "Migrate to current version" anyway (after just
finishing installing MySQL to see if maybe that's why it wasn't
running) and I got a more descriptive error message/dialog box. It
said that the version of Rake installed was not compatible.
I went to Tools -> ruby gems and saw that it could not find Rake. So I
decided to do a command line install of rake just to overwrite what's
there, which is when I noticed that it started to install it into
"~/.gems" because I was running it as my own user and not root.
The problem was that on command line, it was going into my ~/.gems to
get the missing packages, whereas Netbeans was getting it from
/usr/local. I "rm -rf ~/.gems" and did a "sudo gem install rake" and
everything was installed in its proper location under /usr/local
Hope this helps someone else out there.
-elmo
|
--
Chris Kutler
------------
E ho mai ka ike mai luna mai e |
|
| 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
|
|
|
|
|