Tag: 乘客

无法在Snow Leopard上安装乘客3(使用RVM和ruby 1.9.2)

我一直试图安装乘客但还没有成功。 我安装了gem,但是当我跑的时候 passenger-install-apache2-module 它告诉我 This installer must be able to write to the following directory: /Users/myname/.rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.0 But it can’t do that, because you’re running the installer as myname. Please re-run this installer as root. 但如果我这样做 sudo passenger-install-apache2-module 我明白了 /Users/myname/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error’: Could not find RubyGem passenger (>= 0) (Gem::LoadError) 来自/Users/myname/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:219:in activate’ from /Users/myname/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:1065:in gem’from /Users/myname/.rvm/gems/ruby-1.9.2-p0/bin/passenger-install-apache2-module :18:” […]

需要有关将我的第一个rails应用程序部署到mediatemple(dv)的建议

我正在尝试在mediatemple(dv)上部署我的第一个rails应用程序,我没有任何运气。 我正在尝试使用phusion乘客所以我去了http://www.modrails.com/videos/passenger.mov并观看了有关安装这个的教程。 我做了一切没有任何问题,当我指向我的IP时,我看到一个apache页面,而不是我的rails应用程序。 我注意到在mediatemple上,我不得不创建一个vhosts.conf文件并运行一个命令来重新配置我的项目以查看这个vhosts.conf文件。 参考 – http://kb.mediatemple.net/questions/1621/Why+is+my+vhost+file+not+being+used+by+Apache%3F#dv_40对于最后一步,我做了/usr/local/psa/admin/sbin/httpdmng –reconfigure-domain xxx.xx.xx.xx而不是重新配置全部。 这是我的vhosts.conf文件的样子: LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p125/gems/passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p125/gems/passenger-3.0.11 PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p125/ruby ServerName xxx.xx.xx.xx DocumentRoot /var/www/vhosts/myProject/httpdocs # <– be sure to point to 'public'! AllowOverride all # <– relax Apache security settings Options -MultiViews # <– MultiViews must be turned off 任何人都有幸在mt(dv)上部署rails应用程序,可以向rails noob提出一些建议吗?

什么用户正在运行我的Rails应用程序?

我正试图在Apache,Passenger 3.0.0和Rails 3.0.3下部署一个简单的Rails应用程序。 我遇到了各种奇怪的错误。 主要围绕我认为与bundler或RAILS_ENV相关的内容。 关于应用程序,只有非默认的事情是开发和测试环境使用SQLite3,生产使用MySQL。 当从Web浏览器访问应用程序时,Passenger会抛出有关gems(sqlite3)的错误,这些错误是(在Gemfile和database.yml中)声明为非生产环境的一部分。 如何判断服务器尝试运行我的Rails应用程序的用户是什么? 我想确保为该用户正确设置RAILS_ENV,因为我认为Passenger因某种原因试图在开发模式下运行此应用程序。 编辑:添加了ps aux | grep httpd结果 ps aux | grep 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 […]

Rails App维护而不妨碍访客

Phusion Passenger错误消息不是我希望访问者在我更新后端时登陆我的网站时看到的内容。 那么我该如何解决这个问题呢? 我的部署过程从一开始就存在缺陷吗? 还是有什么我错过了? 这是我的部署过程,所以你得到了图片: 提交对git仓库的新更新并推送到远程 上限部署 ssh [ip] 耙gem:安装 rake db:migrate 黄瓜 cap部署和db:migrate或gems:install之间的时间是出现错误消息或更长时间的维护期间。 在我写这篇文章时,一个想法让我感到震惊:我可以将这些命令放入我的部署配方中吗? 但是,如果维护需要30分钟或一小时,这些命令将无法解决问题。 如何在这段时间内向访问者提供维护启动页面? 提前致谢。

如何在生产环境中启动乘客?

我使用以下命令启动Rails 3应用程序: passenger start -a 0.0.0.0 -p 3000 -d 但是如何告诉passenger在production环境中启动应用程序?

不同的Ruby on Rails生产Web服务器之间的建议(和差异)

我很快就计划将我的第一个Ruby on Rails应用程序部署到生产环境中,我甚至选择了一个带有所有托管服务器的webhost,以及你期望从RoR提供商那里获得的Capistrano。 提供商允许使用Mongrel,Thin,Passenger和FastCGI Web服务器,这看起来非常灵活,但老实说我不知道​​它们之间的差异。 我已经对它们进行了一些调查,但是当它们开始讨论function和最大同时请求时,它们会变得有点多 – 而且这些数据似乎会根据发布者的不同而有所不同。 我看过Passenger(表面上看) – 这看起来对我很有吸引力 – 但我的印象是Passenger不是真正的网络服务器,而是更像是Apache或nginx之上的一层并且管理产生了应用程序的实例(如Mongrel集群)。 任何人都可以请我直截了当地说明外行人的条款,以便我可以明智地选择(因为任何看过印第安纳琼斯和最后的远征的人都知道如果你选择不好会发生什么)。

无法上传乘客应用程序behing apache

无法在apache后面的乘客应用程序中上传8.4 MB文件。 通过scp传输相同的文件需要4.1分钟。 错误回溯: [pid = 10222 file = \ text / apache2 / Hooks.cpp:727 time = 2010-05-18 07:13:14.842]:mod_passenger中出现意外错误:接收HTTP上传数据时出错:对等方重置连接(104) Backtrace:在’int Hooks :: handleRequest(request_rec *)’中的’boost :: shared_ptr Hooks :: receiveRequestBody(request_rec *,const char *)’(Hooks.cpp:1084)中(Hooks.cpp:459) 注意:用户没有取消或任何东西。 他在火狐上:-) 日志中看到的其他错误包括: [pid = 16593 file = ext / apache2 / Hooks.cpp:727 time = 2010-05-23 23:06:12.156]:mod_passenger中出现意外错误:浏览器看起来没有完成文件上传:它说它会上传6610086 \ _字节,但发送610155字节后关闭了连接。 用户可能在浏览器中单击了“停止”或他的Interne \ t连接已停止。 Backtrace:在’int […]

Nginx工作进程无法访问config.ru

我在DO Ubuntu x64上设置了我的RoR应用程序。 在Nginx port 8080 。 我的配置: server { listen 8080; # server_name www.mydomain.com; passenger_enabled on; passenger_app_env development; root /home/edgars/Proj/public; } 在Nginx日志文件中出错: Cannot stat ‘/home/edgars/Proj/config.ru; This error means that the Nginx worker process (PID 18065, running as UID 33) does not have permission to access this file. 正如我对此问题的研究表明,我需要确保Nginx用户可以访问该路径。 sudo -u www-data cd /edgars 得到错误: […]

乘客不承认本地安装的gem,与打包的gem一起工作

这是一个生产服务器。 我安装了Passenger,它在大多数情况下都能正常工作。 但是,我总是要把gem打包成项目。 如果我不这样做,我收到此错误消息: Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. gem list –local返回rails 2.3.8以及2.3.5所以gem实际上并没有丢失。 由于我无法解决此问题,因此我会在每个项目中都包含rails gem(结果是正常运行的应用程序)。 有任何想法吗? PS我确实尝试了错误消息的建议,我的配置是要求2.3.8我已安装

Rails 3,apache和passenger,send_file发送零字节文件

我正在努力使用带有rails 3.0.9的send_file运行ruby 1.9,在ubuntu lucid上的apache上用乘客3.0.8 xsendfile模块已安装并加载到apache root~# a2enmod xsendfile Module xsendfile already enabled 它在启用mods时正确符号链接 lrwxrwxrwx 1 root root 32 Aug 8 11:20 xsendfile.load -> ../mods-available/xsendfile.load config.action_dispatch.x_sendfile_header = “X-Sendfile”在我的production.rb中设置 使用send_file会导致将零字节文件发送到浏览器 filepath = Rails.root.join(‘export’,”#{filename}.csv”) if File.exists?(filepath) send_file filepath, :type => ‘text/csv’ end