ociruby

Start with the sample Rails project

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

Approach A: Bitnami installations using system packages

Bitnami installations using system packages do not configure any Rails project by default. However, you can easily create one by following this guide.

Approach B: Self-contained Bitnami installations

The sample project is located in the /opt/bitnami/projects/sample folder. Start the Rails server with the sample application.

$ cd /opt/bitnami/projects/sample
$ sudo ruby bin/rails server (for Rails 3.x)
$ sudo ruby bin/server (for Rails 2.x)

You should see something like this:

=> Booting WEBrick
=> Rails 4.2.2 application starting on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[     ] INFO  WEBrick 1.3.1
[     ] INFO  ruby 2.0.0 (2015-04-13) [x86_64-darwin10.0.0]
[     ] INFO  WEBrick::HTTPServer#start: pid=3061 port=3000

You should now be able to access the sample application.

Last modification July 29, 2020