如何在Digital Ocean Droplet上安装Github Ruby On Rails项目



我有一个数字海洋水滴,它可以在Ubuntu 14.04上使用Nginx和Unicorn自动设置Ruby on Rails。我正在尝试让一个RubyonRails应用程序从github运行(https://github.com/harrystech/prelaunchr)但是仅仅复制文件似乎不起作用。我不是铁轨专家,所以你能提供的任何帮助都会很棒。看起来github项目是一个完整的、可工作的应用程序,我只需要想办法让它在我的数字海洋液滴上工作。我也找不到这方面的任何指南!

编辑:我是在数字海洋的帮助下想出来的!将ruby安装到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

你的应用程序现在应该在你的ip上运行:3000呜呜!

我在数字海洋的帮助下解决了这个问题!将ruby安装到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

你的应用程序现在应该在你的ip上运行:3000呜呜!

最新更新