Showing posts with label rails. Show all posts
Showing posts with label rails. Show all posts

Thursday, April 12, 2012

How to install JavaScript runtime in Rails

*** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable))

Solution: Install Node.js
install on RHEL:
wget http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm
yum localinstall --nogpgcheck nodejs-stable-release.noarch.rpm
yum install nodejs-compat-symlinks npm


Its also possible to add gem 'therubyracer' to the projects Gemfile and bundle install it.

Friday, May 6, 2011

Create Rails project with any version

gem list
rails (3.0.5,2.3.11)

rails -v
Rails 3.0.5

#Create a rails project with version 2.3.11
rails _2.3.11_ MyProject