Rails development environment in Emacs on OpenSuSE Linux

Today we’ll set up a complete Ruby On Rails development environment on Linux. For an IDE we’ll use Emacs and for host system – OpenSUSE.

Let’s install latest Ruby+Rails bundle before configuring Emacs.¬†You can refer to nice article on that. In short, you need get RVM and follow through script steps in terminal:

> bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Then load path to installed RVM in current bash session:

> . ~/.bash_profile

It’s a bit frustrating that if bash finds a .bash_profile file, it ignores .bashrc, so be careful. Usually, I just move this one line from .bash_profile to .profile or .bashrc.

Then check requirements and install everything what is needed

> rvm requirements

Now let’s set ruby version to 2.0 and install rails (4):

> rvm install 2.0
> rvm use 2.0
> gem install rails
> gem install sqlite3

Now, when everything is ready, we can configure Emacs installation. I assume you’ve already installed emacs package via your favorite package manager.
Then lets add some custom configuration file for ruby configs in the .emacs.d directory, say ruby-configuration.el and add it to your .emacs file using

(load "~/.emacs.d/ruby-configuration.el")

Continue reading Rails development environment in Emacs on OpenSuSE Linux