RailsHoster offers durable rails hosting for good money. In this guide you will learn how to deploy your Alchemy Site on your RailsHoster server. Please be sure that you have read the Getting Started Guide to be familar with the Alchemy installation steps. After finishing this guide you will know:
- How to initialize your local Alchemy installation so it is ready to be deployed on RailsHoster
- How to deploy changes you've made to your server
We assume that you already have ordered a hostingplan on RailsHoster.
If not please go to railshoster.com and choose a plan that suites your needs.
Alchemy runs with all plans, even the smallest one starting a only € 4,95.
Install the railshoster gem
$ gem install railshoster
Create a remote git repo
Create a new repository on GitHub or, if you have one, into your own Gitolite/Gitosis server or where ever you have your git remote repositories.
DO NOT EVER STORE ANY CRITICAL INFORMATIONS, LIKE DATABASE OR SSH PASSWORDS INTO YOUR GIT REPOSITORY, UNLESS YOU HAVE A PRIVATE ONE!
Remember: GitHub repositories from the free plan are open to the public.
Init your project as git repository
Inside your projects folder enter:
git init .
.gitignore file in your editor and add:
You can pass
--scm=git option to the Alchemy installer while creating a new project. That option inits your project as git repository and sets all ignores for you.
Add the remote repository
git remote add origin firstname.lastname@example.org:repository-name.git
Repository server with a non standard ssh port
git remote add origin ssh://email@example.com:SSHPORT/repository-name.git
Initialize your project for railshoster
railshoster init -a YOUR_APP_KEY .
You received your app key for your rails app with your order confirmation from railshoster.
Add Alchemy and Rails 3.1 deploy tasks
config/deploy.rb file with an editor and add:
require 'alchemy/capistrano' load 'deploy/assets'
If your repository server has a non standard ssh port
set :repository, "firstname.lastname@example.org/repository-name.git"
set :repository, "ssh://email@example.com:SSHPORT/repository-name.git"
Commit and push deploy settings
$ git commit -am 'Added deploy settings' $ git push origin master
Run the setup task
If prompted, enter the mount point of Alchemy to the same you have in your
Make your first cold deploy
Sometimes the ssh-key forwarding does not work. If the deploy script wants you to enter a password for the repository server then something is wrong with the key forwarding. RailsHoster has a guide how to fix this in their knowledge base.
Check the installation
Open a browser and enter the domain the railshoster gem just showed you after succesfull deploy.
You can always get your domain via the railshoster gem. Just run
railshoster appurl while in your sites folder.
Now you can start to customize your Alchemy site.
Just follow one of our guides.
Everytime you have made a change you want to publish onto your server just run: