Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
[nuby] Can't get rails to work
stephen.hill
10/1/2004 10:40:00 AM
OK, I'm not a complete nuby - I've been using Ruby for almost 5 years
now. But this is my first delve into the wonderful world of web apps.
I have a stock Suse 8.0 installation, ruby 1.8, apache 1.3 and
rails-0.6.5 (from tarball) installation. I have tried installling
rails according to the README file.
Rails has gone into /usr/local/httpd/cgi-bin/rails. I couldn't find an
apache.conf file, but there was a httpd.conf file in /etc/httpd. I
have tried appending the apache conf section in the README into
/etc/httpd/httpd.conf, changing the path heads to
/usr/local/httpd/cgi-bin/rails/. I also made the whole rails directory
tree publicly readable and writable (chmod -R 777 rails). So the
section reads
<VirtualHost *:80>
ServerName rails
DocumentRoot /usr/local/htppd/cgi-bin/rails/public/
ErrorLog /usr/local/htppd/cgi-bin/rails/log/apache.log
<Directory /usr/local/htppd/cgi-bin/rails/public/>
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
</Directory>
</VirtualHost>
I have also set the cgi-bin section to read
<Location /cgi-bin>
AllowOverride None
Options +ExecCGI +FollowSymLinks +Includes
SetHandler cgi-script
</Location>
and I have restarted Apache.
So, the basic problem is that none of the following web addresses give
me the rails spalsh page
http://rails - unknown host
http://127.0...
- not found
http://127.0.0.1/cgi...
- forbidden
And (for example) if I try
http://127.0.0.1/cgi...
I get the
following line in rails/lo/apache.log
[date] [error] [client 127.0.0.1] attempt to invoke directory as
script: /usr/local/httpd/cgi-bin/rails
What am I doing wrong please?
regards, treefrog
3 Answers
David Heinemeier Hansson
10/1/2004 2:47:00 PM
0
> OK, I'm not a complete nuby - I've been using Ruby for almost 5 years
> now. But this is my first delve into the wonderful world of web apps.
>
> I have a stock Suse 8.0 installation, ruby 1.8, apache 1.3 and
> rails-0.6.5 (from tarball) installation. I have tried installling
> rails according to the README file.
The one thing you don't want to be bogged down with when learning a new
environment is configuration. The best way to avoid that is to go with
GEMs for installation and WEBrick as the web server.
You can learn about GEMs with
http://www.rubyon...
sho....
Once you have that up, you can start the WEBrick server with "cd
public; ruby dispatch.servet -a".
Then go to http://localhost:3000 -- you're on Rails!
...once you're ready to play around with Apache again, here are my
suggestions:
> Rails has gone into /usr/local/httpd/cgi-bin/rails. I couldn't find an
> apache.conf file, but there was a httpd.conf file in /etc/httpd.
That sounds like the one you want..
> <VirtualHost *:80>
> ServerName rails
> DocumentRoot /usr/local/htppd/cgi-bin/rails/public/
It looks like you got httpd wrong as "htppd". Apache is not really to
good about being clear on errors like that. They often mask as
Permissions Denied.
> and I have restarted Apache.
> So, the basic problem is that none of the following web addresses give
> me the rails spalsh page
> http://rails - unknown host
>
http://127.0...
- not found
>
http://127.0.0.1/cgi...
- forbidden
You need to add this line to your /etc/hosts file:
127.0.0.1 rails
--
David Heinemeier Hansson,
http://www.rubyon...
-- Web-application framework for Ruby
http://www.in...
-- A No-Step-Three Wiki in Ruby
http://www.basec...
-- Web-based Project Management
http://www.loudthi...
-- Broadcasting Brain
http://www.next...
-- Development & Consulting Services
!DSPAM:415d6df1678164797017188!
stephen.hill
10/4/2004 1:03:00 PM
0
David Heinemeier Hansson <david@loudthinking.com> wrote in message news:<BCE93DB8-13B8-11D9-8B22-000D932CD5BA@loudthinking.com>...
> > OK, I'm not a complete nuby - I've been using Ruby for almost 5 years
> > now. But this is my first delve into the wonderful world of web apps.
> >
> > I have a stock Suse 8.0 installation, ruby 1.8, apache 1.3 and
> > rails-0.6.5 (from tarball) installation. I have tried installling
> > rails according to the README file.
>
> The one thing you don't want to be bogged down with when learning a new
> environment is configuration. The best way to avoid that is to go with
> GEMs for installation and WEBrick as the web server.
The installation seems fine - I don't have web access on my Linux box
- so I tend to take tars and unzip them
>
> You can learn about GEMs with
http://www.rubyon...
sho....
>
> Once you have that up, you can start the WEBrick server with "cd
> public; ruby dispatch.servet -a".
>
> Then go to http://localhost:3000 -- you're on Rails!
I did try that but I couldn't get it to go - could it be colliding
with the Instiki WEBrick server?
>
>
> ..once you're ready to play around with Apache again, here are my
> suggestions:
>
> > Rails has gone into /usr/local/httpd/cgi-bin/rails. I couldn't find an
> > apache.conf file, but there was a httpd.conf file in /etc/httpd.
>
> That sounds like the one you want..
>
> > <VirtualHost *:80>
> > ServerName rails
> > DocumentRoot /usr/local/htppd/cgi-bin/rails/public/
>
> It looks like you got httpd wrong as "htppd". Apache is not really to
> good about being clear on errors like that. They often mask as
> Permissions Denied.
>
> > and I have restarted Apache.
> > So, the basic problem is that none of the following web addresses give
> > me the rails spalsh page
> > http://rails - unknown host
> >
http://127.0...
- not found
> >
http://127.0.0.1/cgi...
- forbidden
>
> You need to add this line to your /etc/hosts file:
>
> 127.0.0.1 rails
Aha!
I will try everything you have suggested - thanks for the help
regards
Steve
> --
> David Heinemeier Hansson,
>
http://www.rubyon...
-- Web-application framework for Ruby
>
http://www.in...
-- A No-Step-Three Wiki in Ruby
>
http://www.basec...
-- Web-based Project Management
>
http://www.loudthi...
-- Broadcasting Brain
>
http://www.next...
-- Development & Consulting Services
>
>
> !DSPAM:415d6df1678164797017188!
David Heinemeier Hansson
10/4/2004 1:36:00 PM
0
> I did try that but I couldn't get it to go - could it be colliding
> with the Instiki WEBrick server?
Not unless you've specifically told Instiki (or some other service) to
live on port 3000. You can do ruby dispatch.servlet --help to get
information about using another than the default port, if that's where
the problem is.
What kind of error are you getting?
--
David Heinemeier Hansson,
http://www.rubyon...
-- Web-application framework for Ruby
http://www.in...
-- A No-Step-Three Wiki in Ruby
http://www.basec...
-- Web-based Project Management
http://www.loudthi...
-- Broadcasting Brain
http://www.next...
-- Development & Consulting Services
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
[nuby] Can't get rails to work
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password