Jump toUpdate content
Getting started with the Ruby on Rails InstantApp
The intended audience of this image are Rails developers who want to bootstrap or test a Rails application easily, in seconds.
Common packages have been installed into the Ruby InstantApp:
Click Instances in the Compute section of the Scaleway console.
Click ”+ Create an Instance”. The instance creation wizard displays.
Enter your Instance details and select the Ruby on Rails image in the InstantApps tab.
Click Create an Instance at the bottom of the page. This action starts your Instance.
- Log into your Instance with the following command:
$> ssh -i /path/to/key root@<your_server_ip>
- Once connected to the Instance, log-in as rails user:
$> su rails
$> source /etc/profile
In the home directory of rails user
/home/rails, you will find the
default directory containing a fresh rails application. You can use it to bootstrap your rails project.
Unicorn is configured to serve the default Rails application in
You can access the Rails application via your browser at
http://your_Instance_ip to view the default app website.
If you want to create a new Rails application, you will have to use the following commands to get it running with unicorn:
Create the new application by running the following command:
$> rails new yourapplicationname
SECRET_KEY_BASEwith the following command:
$> rake -f /home/rails/yourapplicationame/Rakefile secret
Open the file
/etc/default/unicornto change the working directory and
Set application working directory to
SECRET_KEY_BASEvalue to the key generated previously.
Open the file
/etc/unicorn.confand change the
Restart Unicorn as
rootuser, open your browser and visit your IP to view your new application.
$> service unicorn restart
- Getting Started with Rails
- Ruby Version Manager (RVM)
- unicorn: Rack HTTP Instance for fast clients and Unix
- nginx configuration
This image does not contain databases, allowing you instead to install the database of your choice.
To install MySQL, run:
$> apt-get install mysql-server
$> apt-get install postgresql
If you think something is missing in this image, or if it would have been
easier if you had this or that tool, or if this
<whatever> should be configured.
that way instead of how it currently is, we’d love to hear from you!