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

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

    How does this description differ from similar English speakers? Or even what was published here on Habré? The fact that I, like the mass of commentators, rails3beta did not start 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 install the 32-bit version. If you need a 64 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

    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


    Excellent.

    3. Now install the compiler, for building 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 are asked what we want to do, we answer 1 - Compile and install nginx with Passenger support.
    The second time - where to put nginx. By default, it is installed in / opt / nginx /. If there are no special preferences, click 1, if you need another path - 2 and enter the necessary path.

    5. Clone the 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 the necessary libraries

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


    7. Installation of the rails themselves

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


    8. We create the first application and base for it

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


    9. We edit the configuration file nginx /opt/nginx/conf/nginx.conf

    The server section is reduced 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 going to localhost, we will see the following:



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


    Also popular now: