tech:install-ruby-on-rails-activeadmin
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| tech:install-ruby-on-rails-activeadmin [2025/05/31 18:38] – Jean-Baptiste | tech:install-ruby-on-rails-activeadmin [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Install Ruby On Rails - ActiveAdmin | ||
| + | |||
| + | Install de Ryby et Rails avec RVM | ||
| + | < | ||
| + | |||
| + | ~~~bash | ||
| + | curl -sSL https:// | ||
| + | ~~~ | ||
| + | |||
| + | Install de sqlite //vraiment nécessaire !?// | ||
| + | |||
| + | ~~~bash | ||
| + | yum install sqlite-devel | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Ruby Postgres | ||
| + | |||
| + | ~~~bash | ||
| + | sudo yum install postgresql93-devel | ||
| + | export PATH=$PATH:/ | ||
| + | gem install pg | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | rails new [NomDuSite] | ||
| + | cd [NomDuSite] | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | Dans le fichier Gemfile : | ||
| + | [[https:// | ||
| + | |||
| + | |||
| + | `Gemfile` | ||
| + | ~~~ruby | ||
| + | gem ' | ||
| + | gem ' | ||
| + | gem ' | ||
| + | gem ' | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Accès à la DB | ||
| + | |||
| + | Configurez le fichier **config/ | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | bundle install | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | Démarré le serveur | ||
| + | (port TCP 3000 par défaut) | ||
| + | Seulement pour test. Pas nécessaire | ||
| + | |||
| + | ~~~bash | ||
| + | rails server | ||
| + | ~~~ | ||
| + | |||
| + | Puis `Ctrl + C` pour stopper le serveur. | ||
| + | |||
| + | |||
| + | |||
| + | Apache | ||
| + | |||
| + | Install de mod_passenger | ||
| + | |||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | gem install passenger | ||
| + | ~~~ | ||
| + | |||
| + | (passenger-install-apache2-module) | ||
| + | |||
| + | ~~~bash | ||
| + | yum install libcurl-devel httpd-devel | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | exemple de conf apache | ||
| + | |||
| + | `passenger.conf` | ||
| + | ~~~apache | ||
| + | LoadModule passenger_module modules/ | ||
| + | |||
| + | < | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | # Deploying a Ruby on Rails application: | ||
| + | # Suppose you have a Rails application in /somewhere. Add a virtual host to | ||
| + | # your Apache configuration file and set its DocumentRoot to / | ||
| + | # | ||
| + | # < | ||
| + | # RailsEnv production | ||
| + | # | ||
| + | # | ||
| + | # < | ||
| + | # AllowOverride all # <-- relax Apache security settings | ||
| + | # Options -MultiViews | ||
| + | # </ | ||
| + | # </ | ||
| + | ~~~ | ||
| + | |||
| + | ---------- | ||
| + | |||
| + | # Notes en vrac | ||
| + | |||
| + | Prérequis RoR | ||
| + | ~~~bash | ||
| + | yum install make gcc openssl-devel zlib-devel gdbm-devel libyaml-devel readline-devel libffi-devel zlib-devel gcc-c++ curl-devel | ||
| + | ~~~ | ||
| + | |||
| + | ruby | ||
| + | |||
| + | cd / | ||
| + | |||
| + | wget http:// | ||
| + | |||
| + | tar xvf ruby-2.1.2.tar.gz | ||
| + | |||
| + | cd ruby-2.1.2/ | ||
| + | |||
| + | mkdir -p / | ||
| + | |||
| + | ./configure --prefix=/ | ||
| + | |||
| + | make | ||
| + | |||
| + | make install | ||
| + | |||
| + | yum install sqlite-devel | ||
| + | |||
| + | |||
| + | #Ruby postgres | ||
| + | |||
| + | sudo yum install postgresql93-devel | ||
| + | |||
| + | |||
| + | export PATH=$PATH:/ | ||
| + | |||
| + | gem install pg | ||
| + | |||
| + | |||
| + | |||
| + | rails new [NomDuSite] | ||
| + | |||
| + | cd [NomDuSite] | ||
| + | |||
| + | |||
| + | |||
| + | #Dans le fichier | ||
| + | |||
| + | `Gemfile` | ||
| + | ~~~ | ||
| + | gem ' | ||
| + | gem ' | ||
| + | gem ' | ||
| + | gem ' | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | # Accès à la DB | ||
| + | |||
| + | vi config/ | ||
| + | |||
| + | bundle install | ||
| + | |||
| + | |||
| + | |||
| + | # Démarré le serveur | ||
| + | # Seulement pour test. Pas necessaire | ||
| + | |||
| + | rails server | ||
| + | Puis < | ||
| + | |||
| + | |||
| + | |||
| + | Apache | ||
| + | #Install de mod_passenger | ||
| + | |||
| + | |||
| + | gem install passenger | ||
| + | (passenger-install-apache2-module) | ||
| + | |||
| + | Yum install libcurl-devel | ||
| + | httpd-devel | ||
| + | |||
| + | |||
| + | `passenger.conf` | ||
| + | ~~~apache | ||
| + | LoadModule passenger_module modules/ | ||
| + | |||
| + | < | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | |||
| + | # Deploying a Ruby on Rails application: | ||
| + | # Suppose you have a Rails application in /somewhere. Add a virtual host to | ||
| + | # your Apache configuration file and set its DocumentRoot to / | ||
| + | # | ||
| + | # < | ||
| + | # RailsEnv production | ||
| + | # | ||
| + | # | ||
| + | # < | ||
| + | # AllowOverride all # <-- relax Apache security settings | ||
| + | # Options -MultiViews | ||
| + | # </ | ||
| + | # </ | ||
| + | ~~~ | ||
| + | |||
