(newb) installing rails

L

luke

hi i've been having a bit of difficulty installing rails. i've downloaded
and installed the ruby 1.82-16 one-click installer, but when i open a
command prompt and type in gem install rails --remote i get a 'bad command
or file name' message. i'm using win98.

thanks
luke
 
L

luke

thanks dan for the welcome! will try posting to the rails list in a few days
if nothing surfaces. in case there's somewhere here that can help, i'm
pretty sure it has to do with the environment variables on this computer. i
remember the same thing happened when i tried installing ruby, i had to go
through some steps to get it to the point where it could type 'ruby file.rb'
into the command prompt and have it work. now the problem is getting the
command prompt to recognise the 'gem' key word. but i'm not sure what to put
in a new environment variable (i think that's the right term).



Hi Luke, welcome!

If you don't get a satisfactory answer here, try the rails mailing list:

http://lists.rubyonrails.org/mailman/listinfo/rails

Good luck!

Dan
 
C

carlos tirado

=20
when i open a command prompt and type in
gem install rails --remote i get a 'bad command
or file name' message. i'm using win98.

gem (and Rails) use *.cmd extension batch files. These don't work on
win98 apparently. Renaming them to *.bat by itself will not solve your
problem either, and only you know the reason you want to run rails on
win98. I mean, if Ruby does work, why shouldn't rails (and gem) too?

When I tried this, I found that the gem installer uses some other
win98 incompatible commands. I believe it was:
<ruby_home>/lib/ruby/site_ruby/1.8/rubygems.rb on
def find_home, line 326
return "#{ENV['HOMEDRIVE']}:#{ENV['HOMEPATH']}"
and a couple of lines below
File.expand_path("~")

I rember "commenting out" both lines , and I believe I replaced the
first one with just return "c:/", and things started sort-of working.

Rails did install after that.But then trying to run it, I found it too
used the same win98 incompatibilities, it even says "adapted from
RubyGems"
on <ruby>/lib/ruby/gems/1.8/gems/rails-0.12.0/lib/rails_generator/lookup.rb
lines 31 & 33. I replaced them with return ... the absolute path to my
working rails directory (where you'll be generating your app).

That almost worked.

I had a preexisting folder/directory there, and when I typed
'rails install my_app', it did generate everything, only it put it all
on that pre-existing folder, and not on one called 'my_app'. It didn't
even create that one.

Since I was tired by then, I didn't continue trying to "fix" rails, I
simply copied all the generated files and directories to a backup
"template" folder from which I copied them every time I wanted a new
test rails app. Easier than generating I thought.

And that did work.

Oh. To save you some additional headaches I suppose, for Apache/MySQL
I installed XAMPPLite
http://www.apachefriends.org/en/xampp-windows.html

But don't bother trying to get FastCGI working on win98. It won't.
Yes, your app will be slow.

Having said all that. See what you can do about working in (or
upgrading to) a modern OS.

I hope this helps

C
 
J

Jim Weirich

When I tried this, I found that the gem installer uses some other
win98 incompatible commands. I believe it was:
<ruby_home>/lib/ruby/site_ruby/1.8/rubygems.rb on
def find_home, line 326
return "#{ENV['HOMEDRIVE']}:#{ENV['HOMEPATH']}"
and a couple of lines below
File.expand_path("~")

We do try to make an attempt to "do what's right" on whatever platform we are
running on. We only return the HOMEDRIVE/HOMEPATH string if both HOMEDRIVE
and HOMEPATH exist.

Here's the current find_home strategy:

* Use ENV['HOME'] if it exists.
* Use ENV['USERPROFILE'] if it exists.
* Use "#{ENV['HOMEDRIVE']}:#{ENV['HOMEPATH']}" if both exist.
* Try to expand ~
* If the expansion works, use that.
* If the expansion failed, catch the error and return "C:/"
on windows and "/" on non-windows.

Any suggestions on improving this to work better for win98 would be
appreciated.
 
P

Paul

It sounds to me like a PATH problem.
If you type path at a dos prompt you should see ...c:\ruby\bin;.... in
there somewhere. Add it to your path if it isn't there.
Hope this helps.
Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top