SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
-
Jan 14, 2006, 07:35 #1
Getting script/server to use lighttpd instead of WEBrick
I'm setting up lighttpd and rails on Ubuntu linux. So far I have lighttpd set up just to serve static pages and I have a default installation of Rails 1.0. I know that Rails is supposed to be set up so that if lighttpd is installed on your machine it will use that instead of WEBrick; however, whenever I run script/server in a test Rails app it runs via WEBrick and not lighttpd. Is there anything special I'm supposed to do in order to get this working? The Ruby FastCGI bindings are installed as well (libfcgi-ruby1.8), but I've done nothing special to either the test Rails app I'm using or lighttpd.conf.
-
Jan 14, 2006, 22:12 #2
- Join Date
- Nov 2001
- Location
- Atlanta, GA, USA
- Posts
- 5,011
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Seen this? http://wiki.rubyonrails.com/rails/pa...cript%2Fserver
Pertinent part:
lighttpd has to be in your path for ./script/server to run itUsing your unpaid time to add free content to SitePoint Pty Ltd's portfolio?
-
Jan 15, 2006, 00:41 #3
- Join Date
- Jan 2001
- Location
- Lisboa : Portugal
- Posts
- 418
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Are you sure lighttpd is in your path?
I think if it is, even if it's not properly configured it should try to start it (and at least show you an error)Duarte Carrilho da Graça
RailsHelp.com: Searchable Rails reference
CACA: Committee for the Annihilation of Complicated Acronyms
-
Jan 15, 2006, 04:56 #4
- Join Date
- Aug 2005
- Posts
- 986
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I have this problem too. If I start a console (windows xp) and type "lighttpd" it says: "LigHTTPD running...". But "ruby script/server lighttpd" says that lighttpd is not in my path.
-
Jan 15, 2006, 07:13 #5
- Join Date
- Jan 2001
- Location
- Lisboa : Portugal
- Posts
- 418
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Fenrir2
You need to edit a file called .bash_profile (create it if it doesnt exist), in your home dir. To do this on the terminal:
cd ~/
pico .bash_profile
This makes sure you're in your home dir and opens .bash_profile for editing, then add this:
PATH="$PATH:/path/to/lighttpd/folder"
Of course changing it to point to your lighttpd folder. For example my path is:
PATH="/usr/local/bin:$PATH:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin"
In my case lighttpd is in /opt/local/sbin
On windows, it's something like Control Panel > System > Advanced > Environment Variables, or so I have been toldDuarte Carrilho da Graça
RailsHelp.com: Searchable Rails reference
CACA: Committee for the Annihilation of Complicated Acronyms
-
Jan 15, 2006, 07:45 #6
Okay, lighttpd is in my path. I originally got an error when trying to run
Code:ruby script/server lighttpd
-
Jan 15, 2006, 08:57 #7
- Join Date
- Jan 2001
- Location
- Lisboa : Portugal
- Posts
- 418
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I noticed that if you change the default port (i.e to pick 80 instead of 3000), you have to run it as superuser.
And then once you start running it as superuser, i think it picks up the logfiles or something in a way that you cant run it as regular user anymore.
i.e at least for me, last time i tried, once i run it as superuser, i can never run it as regular user again, but if i always run it at regular user it works fine... I can't really explain it but it just worked like that for me.Duarte Carrilho da Graça
RailsHelp.com: Searchable Rails reference
CACA: Committee for the Annihilation of Complicated Acronyms
Bookmarks