Support #707
Setup Ruby on Rails Development Environment on Arch
Description
- Table of contents
- Prepare the Environment
- Install Multi-user RVM
- Install Ruby
- Resources
This is a guide on how I setup my Ruby on Rails development environment to create a new RoR web application on Arch Linux.
Prepare the Environment¶
- Make sure the system is up to date:
sudo pacman -Syu
- Install a few dependencies:
sudo pacman -S ruby nodejs npm python2
- Install yaourt
- Add bob to the sudo group:
sudo usermod -aG sudo bob
- Enable systemd-timesyncd:
sudo systemctl enable systemd-timesyncd sudo systemctl start systemd-timesyncd
Install Multi-user RVM¶
- Imports the RVM signing key:
sudo gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
- NOTE: If that fails run the following:
curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import -
- NOTE: If that fails run the following:
- Download and install rvm as the bob user:
curl -L get.rvm.io | sudo bash -s stable
- After the script has finishes edit the ~/.bashrc file:
nano ~/.bashrc
- Then add the following line to the end of the file
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
- Then add the following line to the end of the file
- Add bob to the rvm group:
sudo usermod -aG rvm bob
- Logout and then login again for the group changes to take effect.
- Check any missing requirements for RVM:
rvm requirements
Install Ruby¶
- List the known available ruby versions:
rvm list known
- Install Ruby 2.2:
rvm install 2.2
- Install the rails gem:
gem install rails
- (Optional) Install libv8:
gem install libv8 -- --with-system-v8
- (Optional) Install libv8:
Create a New Web Application¶
- Create the new Ruby on Rails web application:
rails new new_app
- Install the new web applications dependencies:
bundle install --path vendor/bundle
- Start the rails development web server:
bundle exec rails s
- NOTE: The development web server bind the IP address to the localhost by default, so accessing it over the network will not work. To allow network access to the development web server:
bundle exec rails s -b 0.0.0.0
- NOTE: The development web server bind the IP address to the localhost by default, so accessing it over the network will not work. To allow network access to the development web server:
Resources¶
Updated by Daniel Curtis about 9 years ago
- Description updated (diff)
- Status changed from New to In Progress
- % Done changed from 0 to 50
Updated by Daniel Curtis about 9 years ago
- Description updated (diff)
- % Done changed from 50 to 60
Updated by Daniel Curtis about 9 years ago
- Description updated (diff)
- % Done changed from 60 to 70
Updated by Daniel Curtis about 9 years ago
- Description updated (diff)
- % Done changed from 70 to 100
Updated by Daniel Curtis about 9 years ago
- Description updated (diff)
- Status changed from In Progress to Resolved