–
Marnen Laibow-Koser
http://www.marnen.org
[email protected]Sent from my iPhone
You are not helpful. Please stop.
–
Marnen Laibow-Koser
http://www.marnen.org
[email protected]Sent from my iPhone
You are not helpful. Please stop.
On 7 December 2010 13:25, Rob Th [email protected] wrote:
Remove executables:
Successfully uninstalled rails-2.3.8
activeresource (2.3.8, 2.3.5, 2.2.2)
highline (1.5.0)
hpricot (0.6.164)
libxml-ruby (1.1.2)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
rack (1.1.0, 1.0.1)
rails (2.3.5, 2.2.2, 1.2.6)
Note the above
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
RobsiMac:~ rob$ rails -v
-bash: rails: command not foundI expected after deinstalling rails 2.3.8 gem list local would find the
other rails versions. But did this blow away all rails?
No, 2.3.5, 2.2.2 and 1.2.6 are still installed as noted above
I admit I am in learning mode. I thought this was a place to help out
beginners. I have been programming in Assembler, C, and tons of SQL and
now some PHP and writing shell scripts since the late 70s, and the
complexity and impreciseness of the books and tutorials are amazing RoR,
I can’t say that I agree with you here. What is confusing is that
there are so many out of date tutorials and mailing list archive
entries that are found when searching for data on rails. This is
inevitable unfortunately if you want to experiment with fast moving
technologies like Rails. All the ones you mention have been little
changed for decades so the documentation is stable.
Is there a way to just go into the file system, and delete all the
directories for Rails and just do a fresh reinstall. I cannot figure out
rvm,
I don’t understand why you want to that. What is the problem you are
having? Having multiple versions of things is not an issue provided
you have the versions you need and they are specified in your app. It
will then use those versions.
Looking back at the OP I see that you are trying to get an existing
app running. Why not just concentrate on that and sort out the
problems as you come to them?
Colin
Rob Th wrote in post #966879:
–
Marnen Laibow-Koser
http://www.marnen.org
[email protected]Sent from my iPhone
You are not helpful. Please stop.
You know, I had decided I wasn’t going to post further answers here, but
then it seemed like you actually had started listening to what people
were telling you. I guess I was wrong.
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Sent from my iPhone
Rob Th wrote in post #966881:
pepe,
“Removing gems is a little boring but it shouldn’t take you more than
10 or 15 minutes to remove all the ones you need to remove once you
get the hang of it.”How, I tried the
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.8Select gem to uninstall:
- rails-2.3.8
- rails-2.3.8
- All versions
3
Remove executables:
railsin addition to the gem? [Yn]
Removing rails
Successfully uninstalled rails-2.3.8
Remove executables:
railsin addition to the gem? [Yn]
Removing rails
Successfully uninstalled rails-2.3.8
RobsiMac:~ rob$ rails -v
-bash: /usr/bin/rails: No such file or directoryI seem to have messed up somehow. (i.e. I expected after running “sudo
gem uninstall rails -v 2.3.8” I would get “rails -v” saying the next
most current version.)It seems like it uninstalled more than 2.3.8 but on gem list there are
version still around there. Eww.
I recently had this happen as well. If I tell you what I think is going
on, will you actually pay attention, or will you just give me the
brush-off again? If the latter, I’m not going to waste my time writing
an explanation; if the former, I’ll be happy to. Your choice; just let
me know how you’d like to do things.
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Sent from my iPhone
Rob Th wrote in post #966852:
I expected after deinstalling rails 2.3.8 gem list local would find the
other rails versions. But did this blow away all rails?I admit I am in learning mode. I thought this was a place to help out
beginners. I have been programming in Assembler, C, and tons of SQL and
now some PHP and writing shell scripts since the late 70s, and the
complexity and impreciseness of the books and tutorials are amazing RoR,Is there a way to just go into the file system, and delete all the
directories for Rails and just do a fresh reinstall. I cannot figure out
rvm,
Hopefully this will help clear things up for you. The installation of
Ruby on Rails on Mac OS X is a bit different than on other platforms. A
version of both Ruby and Rails are pre-installed either with the
operating system or Xcode (not sure which since I always install Xcode
on all my systems).
Some (usually older) versions of a number of gems are installed in the
Mac OS X system library (/System/Library/). The gem command (even using
sudo) cannot be used to uninstall these system gems.
It might be possible to use the root user to delete the framework that
contains those gems, but I don’t know what you might break in doing so.
With RVM you can effectively “replace” all the pre-installed system gems
with gemsets that you can fully manage. Installing and learning RVM is
actually easier than trying to manage the system installed gems
(including the Rails ones).
pepe,
“Removing gems is a little boring but it shouldn’t take you more than
10 or 15 minutes to remove all the ones you need to remove once you
get the hang of it.”
How, I tried the
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.8
Select gem to uninstall:
3
Remove executables:
rails
in addition to the gem? [Yn]
Removing rails
Successfully uninstalled rails-2.3.8
Remove executables:
rails
in addition to the gem? [Yn]
Removing rails
Successfully uninstalled rails-2.3.8
RobsiMac:~ rob$ rails -v
-bash: /usr/bin/rails: No such file or directory
I seem to have messed up somehow. (i.e. I expected after running “sudo
gem uninstall rails -v 2.3.8” I would get “rails -v” saying the next
most current version.)
It seems like it uninstalled more than 2.3.8 but on gem list there are
version still around there. Eww.
-bash: /usr/bin/rails: No such file or directory
I seem to have messed up somehow. (i.e. I expected after running “sudo
gem uninstall rails -v 2.3.8” I would get “rails -v” saying the next
most current version.)
I believe the problem might lie in leaving the ‘=’ sign out of the
command:
gem uninstall rails -v=2.3.8 (what I would have typed) vs. gem
uninstall rails -v 2.3.8 (what you actually typed)
I’m not sure, but maybe you had 2 different versions of 2.3.8
installed (if that is possible)? I guess it’s possible that when you
answered with option 3 it went out and blanketed out the rails
versions and now you don’t have any of them.
If that is the case and since you need rails installed you can install
it by just specifying the version you want:
gem install rails -v=x.x.x (replace the x.x.x with the version you
need). That should install any other dependencies it might need if you
still don’t have them.
If you have problems or more questions I think it might be helpful if
you post the list of gems you have now to give us a better idea about
what mismatches you could have.
There is something you should know I am not sure you are aware of.
Different versions of Ruby and Rails have different dependencies. For
example, a given version of rails might need a minimum (and maybe
maximum) version of activerecord. Just having any version of
activerecord will not do.
In my opinion the best thing you could do if you want to have a
“clean” environment is remove everything you have and install what you
need. The process shouldn’t be difficult.
I believe the prior mentions to RVM were meant to indicate to you that
there are ways of keeping separate “environments” if you need them.
For example, you might have an application that runs under Ruby 1.8.6
and Rails 2.3.5 and another one under the latest Ruby and Rails
versions. The activerecord and related gems you need are going to be
different for sure for between both environments. RVM will help you to
keep those 2 environments separate.
pepe wrote in post #966887:
Pepe, Thanks.
If you have problems or more questions I think it might be helpful if
you post the list of gems you have now to give us a better idea about
what mismatches you could have.
RobsiMac:~ rob$ gem list --local
*** LOCAL GEMS ***
actionmailer (2.3.8, 2.3.5, 2.2.2, 1.3.6)
actionpack (2.3.8, 2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.8, 2.3.5, 2.2.2, 1.15.6)
activeresource (2.3.8, 2.3.5, 2.2.2)
activesupport (2.3.8, 2.3.5, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
dnssd (0.6.0)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.0)
hpricot (0.6.164)
libxml-ruby (1.1.2)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
rack (1.1.0, 1.0.1)
rails (2.3.5, 2.2.2, 1.2.6)
rake (0.8.3)
RedCloth (4.1.1)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubynode (0.1.5)
rvm (1.1.3)
sqlite3-ruby (1.2.4)
termios (0.9.4)
xmpp4r (0.4)
RobsiMac:~ rob$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
RobsiMac:~ rob$ rails -v
-bash: rails: command not found
There is something you should know I am not sure you are aware of.
Different versions of Ruby and Rails have different dependencies. For
example, a given version of rails might need a minimum (and maybe
maximum) version of activerecord. Just having any version of
activerecord will not do.
Thanks. I am pretty sure this is true. Some people think that is a good
thing. I am not so sure.
In my opinion the best thing you could do if you want to have a
“clean” environment is remove everything you have and install what you
need.
That is where I got started. But instead people are trying to convince
me to keep multiple versions, but if this is screwed up why?
The process shouldn’t be difficult.
I wish I could figure out how. Not just what tool to work.
I believe the prior mentions to RVM were meant to indicate to you that
there are ways of keeping separate “environments” if you need them.
No kidding.
For example, you might have an application that runs under Ruby 1.8.6
and Rails 2.3.5 and another one under the latest Ruby and Rails
versions. The activerecord and related gems you need are going to be
different for sure for between both environments. RVM will help you to
keep those 2 environments separate.
I only need one environment ruby 1.8.7 and rails 2.2.2.
Pepe, thanks again.
Robert W. wrote in post #966886:
Rob Th wrote in post #966852:
I expected after deinstalling rails 2.3.8 gem list local would find the
other rails versions. But did this blow away all rails?I admit I am in learning mode. I thought this was a place to help out
beginners. I have been programming in Assembler, C, and tons of SQL and
now some PHP and writing shell scripts since the late 70s, and the
complexity and impreciseness of the books and tutorials are amazing RoR,Is there a way to just go into the file system, and delete all the
directories for Rails and just do a fresh reinstall. I cannot figure out
rvm,Hopefully this will help clear things up for you. The installation of
Ruby on Rails on Mac OS X is a bit different than on other platforms. A
version of both Ruby and Rails are pre-installed either with the
operating system or Xcode (not sure which since I always install Xcode
on all my systems).Some (usually older) versions of a number of gems are installed in the
Mac OS X system library (/System/Library/). The gem command (even using
sudo) cannot be used to uninstall these system gems.It might be possible to use the root user to delete the framework that
contains those gems, but I don’t know what you might break in doing so.With RVM you can effectively “replace” all the pre-installed system gems
with gemsets that you can fully manage. Installing and learning RVM is
actually easier than trying to manage the system installed gems
(including the Rails ones).
I tried rvm and I just don’t get it. Sorry.
I think you are right. I think Xcode installed some of this. Actually I
do not recall any other install. I was pretty surprised to see all these
versions. Not sure where they came from. This whole RoR thing makes me
nervous. I own a bunch of heavy equipment and I have operators and
mechanics. Most RoR types are users, not mechanics. I think I am
leaking hydro and need a wrencher not an operator.
I appreciate your help. I did de-intall xcode last night using the
script from Apple and it did not clean this up either.
Can you explain why after doing a de-install of 2.3.8, ruby -v says no
ruby? See above.
If I reinstall Mac OS do you think that would make this go away and I
could do a new install with just ruby 1.8.7 and rails 2.2.2.
Rob Th wrote in post #966894:
[…]
I tried rvm and I just don’t get it. Sorry.
What don’t you get? Perhaps if you were to say what trouble you’re
having, we could help. But don’t just give up on it.
I think you are right. I think Xcode installed some of this.
Correct. Ruby and Rails come with the Mac OS development tools, which
are installed with Xcode.
Actually I
do not recall any other install. I was pretty surprised to see all these
versions. Not sure where they came from. This whole RoR thing makes me
nervous.
In what respect?
I own a bunch of heavy equipment and I have operators and
mechanics. Most RoR types are users, not mechanics. I think I am
leaking hydro and need a wrencher not an operator.
And when you get a mechanic, you ignore his advice.
I appreciate your help. I did de-intall xcode last night using the
script from Apple and it did not clean this up either.
Yikes! Now you have more problems. You need the Mac OS developer tools
(in particular a C compiler) to be able to use Ruby effectively. You
may have deleted your C compiler by removing Xcode. What do you get if
you type
gcc -v
?
Can you explain why after doing a de-install of 2.3.8, ruby -v says no
ruby? See above.
What deinstallation command did you use? It wouldn’t surprise me if
removing Xcode removes Ruby.
If I reinstall Mac OS do you think that would make this go away and I
could do a new install with just ruby 1.8.7 and rails 2.2.2.
Probably not. Instead, learn to remove the gems you have, or better
yet, set up RVM (help is available if you need it) and learn to use it.
If this is beyond you, you’re not ready to work with Rails. That’s not
meant as an insult of any sort, merely a statement of fact.
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
On Dec 7, 2010, at 10:25 AM, Rob Th wrote:
Can you explain why after doing a de-install of 2.3.8, ruby -v says no
ruby? See above.
Try which ruby in Terminal to see if you don’t in fact have a Ruby
binary in your path. Then try locate ruby to find one. Correct your
path as necessary, and try again.
If I reinstall Mac OS do you think that would make this go away and I
could do a new install with just ruby 1.8.7 and rails 2.2.2.
I think if you re-image this machine (which will leave you with
Apple’s Ruby 1.8.6), then go to the first chapter of version 3 of the
Agile book (which does deal with Rails 2, and has a nice install
section to it) you will be able to install the precise version of
Rails you desire, by using sudo gem install rails -v 2.2.2. I believe
Ruby 1.8.7 came well after Rails 2.2, so you would probably be chasing
errors in Rails if you tried to run it that way.
But to reiterate what others have said over and over here – RVM is
designed from its very foundation to support precisely what you state
you want to do. You have a 2.2.2 application you want to get up and
running and start working on. We are all trying to reach out to you
and offer the slender twig of RVM because we also suspect you want to
do this without hobbling your machine to more modern versions of the
Rails framework. Once you do get this application up and running,
you’re probably going to want to develop something else in Rails 3,
and that requires at minimum 1.8.7 of Ruby.
Walter
On 7 December 2010 15:47, Colin L. [email protected] wrote:
Select gem to uninstall:
I think the above may be why rails -v no longer works, I think you
have removed the executable ‘rails’ aswell as the gem rails 2.3.8. I
don’t know how this all works on a mac though
I think I must concur with the others here that you have got things in
rather a mess and the easiest thing would be to use rvm to sort it
out. If however you have uninstalled the development tools (compilers
and so an as Marmen fears) then you will need to get them back first.
Colin
Colin L. wrote in post #966901:
I don’t know how this all works on a mac though
That makes two of us. At least two of us that know what we don’t know.
Installing xcode is not an issue. It is easy.
I pondered that question:
- rails-2.3.8
- rails-2.3.8
- All versions
3
Remove executables:
railsin addition to the gem? [Yn]
Removing rails
It just not make sense to me that if you are removing a version of
software you would keep the executable. Right?
I have Agile book and the O’reilly Learning book and can follow those to
try an install fresh if I can just make sure I am working with a clean
slate. Seem like as pepe mentioned there are lots of dependencies. I am
not sure how this Mac or the other one got so many versions of rails on
it. It just makes me nervous. I never let a mechanic touch my equipment
unless I understand what he is going to do and most of the time I just
do it myself.
On 7 December 2010 14:32, Rob Th [email protected] wrote:
- rails-2.3.8
- rails-2.3.8
- All versions
3
Remove executables:
railsin addition to the gem? [Yn]
Removing rails
I think the above may be why rails -v no longer works, I think you
have removed the executable ‘rails’ aswell as the gem rails 2.3.8. I
don’t know how this all works on a mac though
Walter D. wrote in post #966900:
On Dec 7, 2010, at 10:25 AM, Rob Th wrote:
Can you explain why after doing a de-install of 2.3.8, ruby -v says no
ruby? See above.Try which ruby in Terminal to see if you don’t in fact have a Ruby
binary in your path. Then try locate ruby to find one. Correct your
path as necessary, and try again.If I reinstall Mac OS do you think that would make this go away and I
could do a new install with just ruby 1.8.7 and rails 2.2.2.I think if you re-image this machine
What is re-image?
Once you do get this application up and running,
you’re probably going to want to develop something else in Rails 3,
and that requires at minimum 1.8.7 of Ruby.Walter
Never, this is the one and only rails app ever. I do want to get 1.8.7
on this machine and rails 2.2.2 to match the source machine.
I would actually like to eventually find a programmer to convert it off
rails.
On Dec 7, 2010, at 11:20 AM, Rob Th wrote:
I think if you re-image this machine
What is re-image?
Use the OS install disks to wipe the machine blank and re-install your
target OS. Given that the Ruby libraries are part of the core OS, not
just Xcode, this may be your only way forward now that you have nuked
your Apple Ruby. Or, you could follow one or another of the fine
Hivelogic install tutorials: google “hivelogic install ruby
Leopard” (or Snow Leopard, if you’re using 10.6).
Walter
Never, this is the one and only rails app ever. I do want to get 1.8.7
on this machine and rails 2.2.2 to match the source machine.I would actually like to eventually find a programmer to convert it off
rails.
If you are thinking about getting a programmer anyway maybe it might
be wiser if you get one now to get your RoR environment straight and
your application running as it should. If what you are unhappy about
is the trouble you’re having with it, you not being an expert, but the
application is doing what it is supposed to at your satisfaction when
the setup is correct I think converting the application might be a
mistake. You probably will end up spending a lot more money rewriting
the application than paying somebody to get your application
environment straight. That’s your call, though, of course.
pepe wrote in post #966915:
Never, this is the one and only rails app ever. I do want to get 1.8.7
on this machine and rails 2.2.2 to match the source machine.I would actually like to eventually find a programmer to convert it off
rails.If you are thinking about getting a programmer anyway maybe it might
be wiser if you get one now to get your RoR environment straight and
your application running as it should. If what you are unhappy about
is the trouble you’re having with it, you not being an expert, but the
application is doing what it is supposed to at your satisfaction when
the setup is correct I think converting the application might be a
mistake. You probably will end up spending a lot more money rewriting
the application than paying somebody to get your application
environment straight. That’s your call, though, of course.
This app is a web front end to a very large piece of other open source
code that is written in Java. It is very database oriented and more than
that I cannot say at this time…
It should have been done in java, but it was not my call at that time. I
want to get the app over to a mac to be able to demo the concept and to
be a guideline (working prototype) for the eventual conversion. I have
many, many years of software but I just do not get rails. I see no issue
with SQL for example. I know rails is a religion to a lot of folks but
for this app it is just not practical long term.
Horses for courses.
See how complicated this question got. I asked how can I get rid of all
the other versions and simplify my environment and I got more complexity
of rvm.
Colin, correct I miss-typed Ruby is still there it is rails that does
not show up in rails -v but gem list local thinks I still have it. And
it looks like de-installing xcode does not remove ruby!
Also, I never heard the term re-image in the context of Mac OS X.
I suppose I am OK with ruby, it is the version I want. Maybe there is a
directory that has all this rails and I can just delete it? Then
reinstall. Can I just do a cmd-find rails and delete everything it
finds?
Also I have been looking for a programmer to convert this but it has not
been easy and this is not my primary project. I just said, let me grab
the app off the ubuntu before it goes away and smack here I am.
On 7 December 2010 16:41, Walter Lee D. [email protected] wrote:
Ruby. Or, you could follow one or another of the fine Hivelogic install
tutorials: google “hivelogic install ruby Leopard” (or Snow Leopard, if
you’re using 10.6).
I am not sure you have nuked ruby. You said in an earlier post that
ruby -v failed, but I think you meant rails -v. If that is true then
rvm should still be an option, provided you have not removed the
development tools (or can get them back).
Colin
On Tue, Dec 7, 2010 at 11:54 AM, Rob Th [email protected] wrote:
I cannot fine documentation as to where on a Mac the rails stuff goes.
It doesn’t matter. You can leave everything where it is and alter
your environment variables to use another version of ruby/rails
installed where ever you like.
You DO NOT need to re-image the machine just to alter the shell’s
$PATH variable.
export PATH=“/path/to/my/ruby:$PATH”
It’s that simple.
–
Greg D.
destiney.com | gregdonald.com
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs