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.
2 Install the railshoster gem
$ gem install railshoster
3 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.
3.1 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.
3.2 Add the remote repository
3.2.1 GitHub Example
git remote add origin email@example.com:repository-name.git
3.2.2 Repository server with a non standard ssh port
git remote add origin ssh://firstname.lastname@example.org:SSHPORT/repository-name.git
4 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.
5 Add Alchemy and Rails 3.1 deploy tasks
config/deploy.rb file with an editor and add:
require 'alchemy/capistrano' load 'deploy/assets'
5.1 If your repository server has a non standard ssh port
set :repository, "email@example.com/repository-name.git"
set :repository, "ssh://firstname.lastname@example.org:SSHPORT/repository-name.git"
6 Commit and push deploy settings
$ git commit -am 'Added deploy settings' $ git push origin master
7 Run the setup task
If prompted, enter the mount point of Alchemy to the same you have in your
8 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.
9 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.
10 Next steps
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: