1

サーバーにruby、gemsetforをインストールするためのベストプラクティスは何ですか。現在、同じ名前のアプリとアカウントが1つあります。将来的には、同じVPSで他のアプリを展開する予定です。

sudoを使用してDebian6にrvmシステム全体をインストールしました。

アプリ固有のgemセットをシステムのrubyの場所または〜/ .rvmにインストールする方が良いですか?どちらか一方に影響を与えるには、deploy.rbにどのコードを入れる必要がありますか?

deploy.rbでコマンドのさまざまな組み合わせを試していますが、エラーが発生します。最新のコマンドは

Gemset 'rails-322' does not exist, 'rvm gemset create rails-322' first, or append '--create'.

Rails 3.2.6を実行しているため、rails-322gemsetがどこから来ているのかわかりません。どこにも指定しなかったのでデフォルトですか。

rvm --rvmrc ---create 1.9.3@myappプロジェクトディレクトリに作成したばかりで、set :use_sudo, trueどのように動作するかを確認するために変更しました。

お互いに少し違うことをする本や参考文献が多すぎることに気づきました。Rails3の動作-KatzDeployingRails-Burnsの本をフォローしています。

私が抱えている問題は、vagrantを実行していないが、VPSにデプロイしているため、アプリの正しいコードを収集することです。

4

1 に答える 1

1

Assuming that you're installing this server primarily for installing rails applications or other things that use bundler -- http://gembundler.com/ -- your best bet is just to use bundler for your rails applications and not worry about gem management outside of that. This will install local bundles with each app.

This is how to add bundler to your capistrano deploy: http://gembundler.com/deploying.html

This is how to use capistrano and rvm together in a way that has worked for me in the past, but generally this will be more of an issue once you have multiple apps: https://rvm.io/integration/capistrano/

Does this answer your question?

于 2012-07-30T14:32:36.080 に答える