Locomotive, the Ruby on Rails application, also named Engine, is only dedicated to the creation / editing of content. In other words, we don't allow anymore developers to create a whole site straight from the UI or even edit the template of a page.

So, sites are exclusively coded locally using our open source tool: [Wagon](🔗).

## Installing the Engine


  • MongoDB 2.6.x or 3.x installed and running on your machine.

  • Ruby 2.1 (or upper)

  • Ruby on Rails 4.2.5 (or higher)

Create a new Ruby on Rails app:

Update the Gemfile of the Rails application by adding the **locomotivecms** gem.

Run the Locomotive installation generator

Finally, run the Rails server

Now, open your browser at http://localhost:3000/locomotive. You should see the Locomotive Sign in page.

## Creating your first account and site

Click on **"Do not have an account?"** link at the bottom page and fill in the Sign up form in order to create your first account.


On the next screen, click on the "Add a new site" button.


Fill in the form and press "Create site"


## Pushing a site template with Wagon


  • ** site handle** you assigned to your site when you created it (radioactive-fern-4299 from the screenshot in the previous chapter).

  • the **email** you used to sign up

  • your **API key** that you can find at this url: http://localhost:3000/locomotive/my_account/edit#api

If you have not installed Wagon, do:

Upgrading Wagon

You can upgrade it by running **bundle upgrade** at the root folder of your Wagon site.

Otherwise, if you have followed on the [quick start page](🔗), go to the folder where you created your portfolio app.

If you have not followed the tutorial on the quick start page, do:

In all three cases, uncomment / complete the **config/deploy.yml** file.

Push your site to the Engine

Finally, go back to your site, you should see something similar to the screenshot below.


A quick note on the options you can pass to

bundle exec wagon push local

  • -d allows you to deploy data that you may have added (i) to .yml files under the data folder of your site on the Wagon or (ii) in the header of your file, under the editable_elements section;

  • -v means verbose and allows you to see what is going when deploying;

  • -r allows you to deploy only certain specific resources of your site. The available resource types are: theme_assets, snippets, content_types and pages. You can learn more about these ressources in the section entitled template.

These parameters are also available when deploying to Heroku or on the Station.