Create a new Rails application

To create a new Rails project, load the Bitnami console, change to the installdir directory and initialize a new project as below. Remember to replace the APPNAME placeholder with the actual name of your project.

$ cd installdir
$ ./rubyconsole
$ rails new APPNAME

Next, start the Rails server by running the following command:

$ cd installdir/APPNAME
$ bundle exec rails s

This will start the Rails server for your application on port 3000. Find more information about how to access the application using your Web browser.

If you see an error on Linux stating “Could not find a JavaScript runtime”, you must add the rubyracer gem (already included in the Bitnami Ruby Stack) into the Gemfile, as below:

gem 'sqlite3'
gem 'therubyracer'
Last modification September 5, 2018