English 中文(简体)
谁使用我的铁路机?
原标题:What user is running my Rails app?

I m试图获得在阿帕奇、旅客3.0和铁路3.0.3下部署的光线铁道。 我会发现各种 we错。 大部分是围绕我认为与爱幼或助老会有关的内容。

仅无过失的一件事是开发与安装;测试环境使用QSQL3和生产。

当从网络浏览器乘客中点击时,对(Gemfile和数据库yml)被宣布为生产环境的NOT部分的地段(sqlite3)正造成错误。

我怎么能告诉服务器试图管理我的铁路机的用户? 我愿确保国际助老会—— ENV是对这一用户的正确安排,因为我认为乘客出于某种原因试图以发展方式管理这一工具。

<<>Edit>:后添加了ps aux epep > httpd

myserver:current elvis$ ps aux | grep httpd
elvis     4424   0.4  0.0    66152    192 s000  S+   11:03AM   0:00.00 grep httpd
_www      1950   0.0  0.2    93024   2544   ??  S    11:40PM   0:01.23 /usr/sbin/httpd -D FOREGROUND
root      1918   0.0  1.0    93024  10244   ??  Ss   11:39PM   0:02.75 /usr/sbin/httpd -D FOREGROUND
_www      4084   0.0  0.2    93024   2536   ??  S     9:41AM   0:00.15 /usr/sbin/httpd -D FOREGROUND

ls -l

myserver:current elvis$ ls -l config
total 48
-rw-rw-r--  1 aaron  admin  1923 Nov 19 21:40 application.rb
-rw-rw-r--  1 aaron  admin   326 Nov 19 21:40 boot.rb
-rw-rw-r--  1 aaron  admin   741 Nov 19 21:40 database.yml
-rw-rw-r--  1 aaron  admin  1257 Nov 19 21:40 deploy.rb
-rw-rw-r--  1 aaron  admin   149 Nov 19 21:40 environment.rb
drwxrwxr-x  5 aaron  admin   170 Nov 19 21:40 environments
drwxrwxr-x  7 aaron  admin   238 Nov 19 21:40 initializers
drwxrwxr-x  3 aaron  admin   102 Nov 19 21:40 locales
-rw-rw-r--  1 aaron  admin  1808 Nov 19 21:40 routes.rb
最佳回答
问题回答

您可以操作<代码>ps aux grep httpd,看看用户如何管理你的切身工作。

这使我用来发现哪些用户应当管理铁路的铁路。

RAILS_USER=$(stat -c  %U  /YOUR_PATH/environment.rb) 

echo "Detected rails user: $RAILS_USER"




相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签