SitePoint Sponsor |
|
User Tag List
Results 1 to 17 of 17
-
Sep 22, 2005, 21:53 #1
- Join Date
- Nov 2004
- Location
- Yakima WA.
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Installation instructions for whole rails stack
OK here is some good instructions that will take you step by step installing the whole ruby/rubygems/rails/lighttpd/fcgi/php stack. Hope it helps someone.
These instructions work on OSX, most linux distros and FreeBSD
You can skip ruby if you already have a good copy. But if you only have the
stock ruby that comes with OSX I would compile it from source and rename the
stock OSX ruby and irb to ruby.bak and irb.bak so you don't end up using
them on accident.
__________________________________________________ ______________
Get Ruby1.8.2
curl -O http://rubyforge.org/frs/download.ph...y-1.8.2.tar.gz
tar xvzf ruby-*
cd ruby-1.8.2
./configure
make
make test
sudo make install
__________________________________________________ ______________
Get Ruby gems
curl -O http://rubyforge.org/frs/download.ph...ems-0.8.10.tgz
tar xvzf rubygems*
cd rubygems*
sudo ruby setup.rb
__________________________________________________ ______________
Get Rails and a few other gems
sudo gem install rails RedCloth search_generator salted_login_generator production_log_analyzer
answer yes to all dependencies
__________________________________________________ ______________
Get mysql-ruby C bindings (the pure ruby ones suck)
This command works great on osx as well using the mysql 4.1.x installer from mysql.com
or the serverlogistics.com mysql as well.
curl -O http://www.tmtm.org/en/mysql/ruby/mysql-ruby-2.7.tar.gz
tar zxvf mysql-ruby-*
cd mysql-ruby-*
ruby extconf.rb --with-mysql-config
make
sudo make install
__________________________________________________ ______________
download fastcgi developers kit
curl -O http://fastcgi.com/dist/fcgi.tar.gz
tar xvzf fcgi-2.4.0.tar.gz
cd fcgi*
./configure
make
sudo make install
__________________________________________________ ______________
Get the new non memory leaking ruby-fastcgi bindings
curl -O http://sugi.nemui.org/pub/ruby/fcgi/...i-0.8.6.tar.gz
tar xzvf ruby-fcgi*
ruby install.rb config --without-ext
ruby install.rb setup
sudo ruby install.rb install
__________________________________________________ ______________
We need the correct pcre .so’s for lighttpd to work correctly
curl -O ftp://ftp.csx.cam.ac.uk/pub/software...cre-5.0.tar.gz
tar xzvf pcre-5.0.tar.gz
cd pcre-*
./configure
make
sudo make install
__________________________________________________ ______________
Get lighttpd
You can install lighttpd 1.4.4 if you want. I'm still using 1.3.16 until
the 1.4 branch settles down.
curl -O http://www.lighttpd.net/download/lighttpd-1.3.16.tar.gz
tar xzvf lighttpd-1.3.13.tar.gz
cd lighttpd-*
./configure
make
sudo make install
__________________________________________________ ______________
Compile php as a fast-cgi binary The main thing here is the following configure options. You can add whatever else you like to your php binary but these are needed for fast-cgi support.
$ ./configure \
--enable-fastcgi \
--enable-discard-path \
--enable-force-cgi-redirect \
__________________________________________________ ______________
Lighttpd Launcher Script
Here is a link for a sweet enhancement. Put this script in your RAILS_ROOT/script folder and put the lighttpd.conf file in RAILS_ROOT/config. Now you can launch your rails app by cd’ing into your RAILS_ROOT for your app and typing:
$ruby script/lighty -p 7500 -e development (or whatever port & env you want to use)
Now you can hit http://localhost:7500/ and you will get your app running on lighttpd no muss no fuss. Very sweet for development. Here is the link: http://www.bigbold.com/snippets/posts/show/303 . Name the first ruby script lighty and name the config file lighttpd.conf. Now every time you start your app this way is creates a new lighttpd.conf in /tmp and starts lighttpd up with that file. This way you can give it command line options as to what port to bind to and others. I’m using this for development and it is sweet!
-
Sep 23, 2005, 15:41 #2
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yer, might hook up my laptop and give it a go I suppose, but really I'm in no hurry
-
Sep 23, 2005, 16:04 #3
I really need to build a Linux box. My current desktop has way too many web servers on it (Tomcat, Apache/PHP, WEBrick for RoR)
-
Sep 24, 2005, 03:36 #4
Is there really any need to download and compile so many source packageS?
I'd personally advise sticking to your distro of choices package management tool if at all possible, whether its apt, portage whatever. Grab Ruby, irb, rdoc and rake via your distros package management tool to get yourself up and running with Ruby, grab rubygems if your package manager also has it otherwise dload/compile/install, then use gems for your ruby packages; you'll need Rails and dependencies, the bindings for your database - MySQL and PostgreSQL both have pure Ruby and C bindings, and I'd also advise grabbing Bluecloth and Redcloth too.
Most package management systems should have the above, as well as Apache2 and lighttpd.
-
Oct 20, 2005, 06:49 #5
- Join Date
- Aug 2005
- Posts
- 986
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
There is instant rails too.
For development I use XAMPP + Ruby One Click Installer + gem install rails.
-
Oct 20, 2005, 08:49 #6
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dr Livingston
-
Oct 20, 2005, 08:55 #7
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by vgarcia
-
Oct 21, 2005, 09:25 #8
Well - over the last month, I've tried every single set of installation instructions I've been able to find, on both Windows XP and MacOSX (Tiger)
and totally failed, until two days ago, to get a working Rails setup.
Which is kind of embarrassing for a professional programmer, even if it was in my spare time.
The closest I'd manager was under Tiger, where I got the standard MySQL problem.
FINALLY managed to get it working, under Tiger, using Locomotive, which makes it almost ludicrously simple (it took five minutes, from the time I clicked on the Locomotive link.)
Highly recommended for any other OSX folk with problems.
Now I just need to find the time to actually try it out...Only dead fish go with the flow
-
Oct 21, 2005, 14:01 #9
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oh, so you've joined the darkside and decided to look at ruby after not believing the hype for so long :P
-
Oct 24, 2005, 08:45 #10
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by dek
I found (well my ex-boss) on OS X if you follow the right instructions generally things work. However, he did run into some issues I think at times, such as MySQL used to play up if you used CocoaMySQL
-
Oct 24, 2005, 09:34 #11
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Alternatively if you use gentoo
emerge mysql
emerge lighttpd
emerge rails
emerge ruby-fcgi
will probably do the trick. I have a load of stuff like -java -php -apache -X etc to stop all the evil trimmings getting installed
-
Oct 24, 2005, 09:49 #12
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Guys, I really don't like the
./configure && make && make install
path because it's hard to uninstall or upgrade such software.
And sometimes there are no precompiled RPMs.
Does anyone have any experience or tips on building RPMs ? I tried to look at docs but it doesn't seem an easy task. Maybe you guys know of some quick and dirty path ?
-
Oct 24, 2005, 09:56 #13
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I did briefly look at building RPM's and to be honest, it's a nightmare. RPM is not the way forward.
if you are going down the autoconf route, I have seen people change the --prefix bit, so you compile the app outside the main bin/lib/include dirs for the fs. after that you can then modify your path variables to point to these external places. That way it is easier to manage for Makefiles such as apache which have no uninstall target. I haven't done this myself really, I normally just bite the bullet and build into /usr on RH systems.
Alternatively, use Gentoo, and then you have the flexiblity of compiling without compromising the ablity to uninstall, update etc. I would assume if you used an "testing" branch of debian, you can also get most things with apt get
-
Oct 24, 2005, 10:10 #14
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by MiiJaySung
All the servers I work on have Red Hat Enterprise 3 and at home I have Fedora Core 4.
It is easy to install software in Fedora Core 4 because now it comes with YUM but that's as long as there are the right RPM packages in the repositories.
-
Oct 25, 2005, 04:33 #15
Originally Posted by MiiJaySung
There's no point in giving a blow-by-blow here, as I've now got it installed, but problems usually seem to revolve around MySQL integration.
If you use MySQL 4.0.x, there shouldn't be a problem. If you use 4.1.x, you may well need to install the latest ruby_mysql - and not everyone manages that one. I've googled to death the link errors that I was getting - and can find no mention of them. Hence my joy at finding Locomotive.Only dead fish go with the flow
-
Oct 25, 2005, 06:41 #16
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oh yea, we also had issues with MySQL Ruby C bindings. They seem to be a curse too on windows as well it seems
-
Oct 25, 2005, 06:47 #17
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by bonefry
The problem with CentOS / RHEL is that if you can't get RPMs (which is often the case if the package is newer than a year), then you have to compile. The fun comes in with things like Apache and PHP which seem to have endless dependacies I found. That is one reason why I don't miss Apache or PHP.
I have no idea why so many hosting companies settle with Fedora, as I found it so buggy, and RHEL is so out dated. In fact I'm sure Debian's stable branch these days is more up to date!
Bookmarks