Search...

20 August 2012

Ruby on Rails Arch Linux Basic Instal

I have been playing with Ruby on Rails for a while after completing a Coursera based SaaS course recently. While undertaking the course I worked on an Ubuntu VM which was provided by the course. However, as in all things I hack around with on Linux I really wanted to set up a basic Rails development environment on my main Arch Linux machine.

While the guide on the Arch wiki was fine when I reached the point of testing my environment I got the following output in bash ....

/usr/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.

A quick hunt around the forums did not help me!

Following the link in the above error message I read up on execjs and found that you need a supported runtime. I opted for therubyracer, an implementation of the Google v8 javascript runtime.

In bash I ran gem install therubyracer which installed the runtime. I then added the following line to my test applications Gemfile :

gem 'therubyracer', :require => 'v8'

Running rails server now served up my test app on the default port (using WEBrick).

1 comment:

benslin kard said...

Ruby on Rails competes with other programming languages in the Web like Python, Java, and PHP etc but ultimately Ruby on Rails has been the leader because of its various advanced and powerful features.