2014-11-06 78 views
-1

我有一个数字海洋液滴,可以在Nginx和Unicorn的Ubuntu 14.04上自动设置Ruby on Rails。我试图从github(https://github.com/harrystech/prelaunchr)运行Ruby on Rails应用程序,但只是复制文件似乎没有工作。我不是一位铁杆专家,所以你能给的任何帮助都会很棒。它看起来像github项目是一个完整的工作应用程序,我只需要弄清楚如何让它在我的数字海洋液滴上工作。我也找不到任何指南!如何在数字海洋液滴上安装Github Ruby On Rails项目

编辑:我想出了一些从数字海洋的帮助!安装在轨道上液滴的红宝石,然后ssh到液滴并执行以下操作:

rm -rf /home/rails/* 
cd /home/rails/ 
git clone https://github.com/harrystech/prelaunchr.git . 
nano Gemfile # Add "gem 'mysql2'" 
nano config/database.yml # Change 'postgres' to 'mysql2' and add user/pass for the database 
gem list | cut -d" " -f1 | xargs gem uninstall -aIx # Uninstall gems that might conflict 
bundle install 
bundle exec rake db:create db:schema:load db:seed 
nano config/environments/production.rb # Set `config.assets.compile = true` 
chown -R rails:www-data * 
service unicorn restart 
exec bundle rails s -d 

您的应用程序现在应该起来,并在yourip运行:3000宇豪!

+0

这些都没有进入如何从github安装... – Alteredorange 2014-11-07 13:09:25

回答

0

我从数字海洋的一些帮助中找出了这一点!安装在轨道上液滴的红宝石,然后ssh到液滴并执行以下操作:

rm -rf /home/rails/* 
cd /home/rails/ 
git clone https://github.com/harrystech/prelaunchr.git . 
nano Gemfile # Add "gem 'mysql2'" 
nano config/database.yml # Change 'postgres' to 'mysql2' and add user/pass for the database 
gem list | cut -d" " -f1 | xargs gem uninstall -aIx # Uninstall gems that might conflict 
bundle install 
bundle exec rake db:create db:schema:load db:seed 
nano config/environments/production.rb # Set `config.assets.compile = true` 
chown -R rails:www-data * 
service unicorn restart 
exec bundle rails s -d 

您的应用程序现在应该起来,并在yourip运行:3000宇豪!