📜 ⬆️ ⬇️

Installing RoR 3 beta + Ruby EE + Passenger on Ubuntu 9.10

Simple 10 steps how to install Ruby EE, Ruby on Rails 3 beta, sqlite3, Passenger and nginx on ubuntu 9.10.
The entire installation is done on a clean system.

How does this description differ from similar English-speaking ones? Or even what was published here on Habré? The fact that I, like the mass commentators, rails3beta not run on them.


1. Download and install Ruby Enterprise Edition (Ruby EE)
')
wget http://rubyforge.org/frs/download.php/68718/ruby-enterprise_1.8.7-2010.01_i386.deb
sudo dpkg -i ./ruby-enterprise_1.8.7-2010.01_i386.deb


Because I have a development machine spinning on a processor without 64-bit support, then we install a 32-bit version. If you need the 64th version:

wget http://rubyforge.org/frs/download.php/68720/ruby-enterprise_1.8.7-2010.01_amd64.deb
sudo dpkg -i ./ruby-enterprise_1.8.7-2010.01_amd64.deb


2. Create symbolic links for ruby, gem and rake

sudo ln -s / usr / local / bin / ruby ​​/ usr / bin / ruby
sudo ln -s / usr / local / bin / gem / usr / bin / gem
sudo ln -s / usr / local / bin / rake / usr / bin / rake

We try

$ whereis ruby
ruby: / usr / bin / ruby ​​/ usr / lib / ruby ​​/ usr / local / bin / ruby ​​/ usr / local / lib / ruby
$ ruby ​​-v
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01


Fine.

3. Now install the compiler, to build nginx, the Zlib library, readline, the sqlite3 database and the sqlite3 library

sudo apt-get install build-essential zlib1g-dev libssl-dev libreadline-ruby git-core install sqlite3 libsqlite3-dev


4. Install nginx with Passenger support

sudo passenger-install-nginx-module


The first time we will be asked what we want to do, we answer 1 - Compile and install nginx with Passenger support.
The second time is where to put nginx. By default, it is set to / opt / nginx /. If there are no special preferences, click 1, if another path is necessary - 2 and enter the required path.

5. We clone startup script for nginx

cd
git clone git: //github.com/jnstq/rails-nginx-passenger-ubuntu.git
sudo mv rails-nginx-passenger-ubuntu / nginx / nginx /etc/init.d/nginx
sudo chown root: root /etc/init.d/nginx
sudo /usr/sbin/update-rc.d -f nginx defaults


6. Update gem and install all necessary libraries.

sudo gem install i18n tzinfo builder memcache-client rack-rack-rack-mount e-mail e-mail mail text-format thor bundler rake sqlite3-ruby


7. Installing the rails themselves

sudo gem install railties --pre
sudo gem install rails --pre


8. Create the first application and the base for it.

rails / var / www / ror3
cd / var / www / ror3
rake db: create: all


9. Edit the nginx configuration file /opt/nginx/conf/nginx.conf

The server section is converted to
 server {
     listen 80;
     server_name localhost;
     root / var / www / ror3 / public;
     passenger_enabled on;
 }



10. Run nginx

sudo /etc/init.d/nginx start


If everything is correct, then go to localhost, we will see the following:



ps Post on Habré first, if something is wrong - ready to listen and mend;)

Source: https://habr.com/ru/post/85105/


All Articles