Project

General

Profile

Support #707

Updated by Daniel Curtis over 8 years ago

This is a guide on how I setup my Ruby on Rails development environment to create a new RoR web application on Arch Linux.  

 h2. Prepare the Environment 

 * Make sure the system is up to date: 
 <pre> 
 sudo pacman -Syu 
 </pre> 

 * Install a few dependencies: ruby: 
 <pre> 
 sudo pacman -S ruby nodejs npm python2 
 </pre> 

 * Add bob to the sudo group: 
 <pre> 
 sudo usermod -aG sudo bob 
 </pre> 

 h2. Install Single-user RVM 

 * Imports the RVM signing key: 
 <pre> 
 gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 
 </pre> 

 * Download and install rvm as the *bob* user: 
 <pre> 
 curl -L get.rvm.io | bash -s stable 
 </pre> 

 * Run the @.profile@ script at login: 
 <pre> 
 echo 'source ~/.profile' >> ~/.bash_profile 
 </pre> 

 * Then rerun the bash login script: 
 <pre> 
 source ~/.bash_profile 
 </pre> 

 * Add bob to the rvm group: 
 <pre> 
 sudo usermod -aG rvm bob 
 </pre> 
 #* *Logout* and then *login* again for the group changes to take effect. 

 * Check any missing requirements for RVM: 
 <pre> 
 rvm requirements 
 </pre> 

 h2. Install Ruby 

 * List the known available ruby versions: 
 <pre> 
 rvm list known 
 </pre> 

 * Install Ruby 2.1: 
 <pre> 
 rvm install 2.1 
 </pre> 

 * Install the rails gem: 
 <pre> 
 gem install rails 
 </pre> 

 h2. Create New Web App 

 * Create the new Ruby on Rails web application: 
 <pre> 
 rails new new_app 
 </pre> 

 h2. Resources 

 * https://wiki.archlinux.org/index.php/Ruby_on_Rails 
 * https://wiki.archlinux.org/index.php/RVM#Multi-user_installation

Back