陷入rvm,capistrano,:system,:用户旋转门

时间:2022-11-09 07:25:33

What is the best practice for installing ruby, gemset for on a server. I currently have one app and an account with the same name. I will be depoloying other apps in the future on the same VPS.

在服务器上安装ruby,gemset的最佳做法是什么?我目前有一个应用程序和一个同名的帐户。我将在同一个VPS上将其他应用程序解压缩。

I have installed rvm system wide on Debian6 using sudo.

我使用sudo在Debian6上安装了rvm系统。

Is it better to install app specific gem set at the system ruby location or in ~/.rvm? What code should I put in deploy.rb to effect one or the other?

在系统ruby位置或〜/ .rvm中安装特定于应用程序的gem集更好吗?我应该在deploy.rb中放入什么代码来实现其中一个?

I am trying various combinations of commands in deploy.rb but end up with errors, the latest is

我在deploy.rb中尝试各种命令组合但最终出现错误,最新的是

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

I am not sure where the rails-322 gemset comes from because I am running rails 3.2.6. Is it a default because I did not specify it anywhere.

我不确定rails-322 gemset的来源,因为我正在运行rails 3.2.6。这是默认值,因为我没有在任何地方指定它。

I just now created rvm --rvmrc ---create 1.9.3@myapp in the project directory changed to set :use_sudo, true will see how it goes.

我刚刚创建了rvm --rvmrc ---在项目目录中创建1.9.3@myapp改为set:use_sudo,true会看到它是怎么回事。

I am finding there are too many books, references which do things a bit differently from each other. I am following Rails3 in Action - Katz Deploying Rails - Burns books.

我发现有太多的书,参考文献做的事情有点不同。我正在关注Rails3 in Action - Katz Deploying Rails - Burns书籍。

The problem I am having is gleaning the correct code for my app as I am not running vagrant but deploying to a VPS.

我遇到的问题是为我的应用程序收集正确的代码,因为我没有运行流浪汉,而是部署到VPS。

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.

假设您正在安装此服务器主要用于安装rails应用程序或使用bundler的其他东西 - http://gembundler.com/ - 您最好的选择就是使用bundler for rails应用程序而不用担心外部的gem管理那个。这将在每个应用程序中安装本地捆绑包。

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

这是如何将capler添加到capistrano部署: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/

这是如何以过去对我有用的方式将capistrano和rvm一起使用,但是一旦你有多个应用程序,这通常会成为一个问题:https://rvm.io/integration/capistrano/

Does this answer your question?

这回答了你的问题了吗?

#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.

假设您正在安装此服务器主要用于安装rails应用程序或使用bundler的其他东西 - http://gembundler.com/ - 您最好的选择就是使用bundler for rails应用程序而不用担心外部的gem管理那个。这将在每个应用程序中安装本地捆绑包。

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

这是如何将capler添加到capistrano部署: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/

这是如何以过去对我有用的方式将capistrano和rvm一起使用,但是一旦你有多个应用程序,这通常会成为一个问题:https://rvm.io/integration/capistrano/

Does this answer your question?

这回答了你的问题了吗?