我正在尝试在Ubuntu上运行Apache2 / Passenger的Ruby on Rails的全新安装。 我能够成功安装apache2,rvm,ruby,rails和passenger,后面的部分按照这个教程。 所有的设施进展顺利; 我结束了这些版本的软件: 在Amazon EC2上运行的Ubuntu 11.10 Apache 2.2.20 RVM 1.10.2 Ruby 1.9.3p0 Rails 3.1.3 乘客3.0.11 运行passenger-install-apache2-module ,安装程序build议我: Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11 PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p0/ruby 当接线Apache2使用mod_passenger时,这是我遇到麻烦的地方。 我去/etc/apache2/mods-available并编辑: passenger.load LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so` 至 LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/ext/apache2/mod_passenger.so` passenger.conf <IfModule mod_passenger.c> PassengerRoot /usr PassengerRuby […]
我正在构build一个基于服务的Web应用程序。 它包含一个纯粹用于处理请求的主要rails应用程序,以及许多其他正在处理这些请求的sinatra服务。 我决定与独angular兽去实际的networking服务器为我的Rails应用程序。 我的困境是挑选合适的堆栈。 我已经阅读了一些有关HAProxy的负载平衡的伟大评论,我认为这是长远的方式。 另一方面,我认识的一些人也说,当我将它与独angular兽一起使用时,nginx会足够好。 目前,我的整个系统将驻留在一台服务器上。 将来,不同的服务器可能会承载不同的服务。 我会介绍haproxy引入不必要的开销吗? 如何使用HAproxy和nginx一起获得真正的收益?
我是6个月的Redmine的一个快乐的用户。 我的计划是设置它,从不更新任何东西,以便不处理依赖和东西。 我正在使用Ubuntu服务器10.04(Apache / Passenger)禁用所有types的更新。 今天早上我开始在浏览器中出现内部错误。 日志文件说的是这样的: Processing WelcomeController#index (for 192.168.1.23 at 2012-03-05 10:44:12) [GET] Parameters: {"action"=>"index", "controller"=>"welcome"} NoMethodError (undefined method `[]' for nil:NilClass): /app/models/setting.rb:100:in `value=' /vendor/rails/activerecord/lib/active_record/base.rb:2589:in `send' /vendor/rails/activerecord/lib/active_record/base.rb:2589:in `attributes=' /vendor/rails/activerecord/lib/active_record/base.rb:2585:in `each' /vendor/rails/activerecord/lib/active_record/base.rb:2585:in `attributes=' /vendor/rails/activerecord/lib/active_record/base.rb:2285:in `initialize' … 我是Ruby / Rails的新手,这是我目前想了解的最后一件事情。 我怎么知道什么是错的,所以我可以尝试修复它?
试图获得部署的Rails应用程序。 一切安装nginx,独angular兽,设置。 错误获取: [109.etc] env RAILS_ENV=production sh -c 'kill -s USR2 '\''cat /tmp/unicorn.pid'\''' sh: line 0: kill: cat /tmp/unicorn.pid: arguments must be process or job IDs 这怎么解决? 我search了一个小时,阅读了很多文档和博客,仍然没有find解决办法。 deploy.rb # config/deploy.rb require "bundler/capistrano" set :scm, :git set :repository, "[email protected]:/srv/paintings.git" set :branch, "origin/master" set :migrate_target, :current set :ssh_options, { :forward_agent => true } set :rails_env, "production" […]
我遵循这个教程: http : //railsapps.github.com/tutorial-rails-mongoid-devise.html 在端口8000上通过代理运行nginx。你可以在这里看到它。 为什么在/ public目录中列出文件? 另外,如果我尝试去任何deviseuris,它显示Nginx的404,而不是铁轨404 …这可能是一个乘客的问题? 我是新的服务器pipe理员/铁轨。 所以这可能是一个nginx的问题OR栏configuration。 任何build议的铁轨学生/僵尸? 我的部分问题是,我不太了解错误日志。 如何检查nginx / apache / rails日志的错误?
所以我们网站的设置是4个运行rails3和nginx1的节点,都使用相同的GoDaddy证书。 由于我们是付费网站,因此我们必须保持PCI-DSS合规性,因此必须使用更昂贵的SSL密码 – 我们也使用Rack强制SSL。 我最近切换到了Linode的NodeBalancer(我读过的是一个HACluster),我们没有得到理想的性能。 从我读到的,它看起来像使用高密码在节点上终止SSL是什么造成了糟糕的性能,但我想要彻底。 有什么我可以做的吗? 我已经读过关于在NodeBalancer之前终止SSL的其他方法(比如使用stud),但我对这些解决scheme还不够了解。 我们当然不想做任何实验或任何有单点失败的事情。 如果真的没有什么能够加速SSL握手的话,我的select是使用安全和不安全的子域来支持Rails上的某些页面。 我已经find了一些指南,但我的结果是在这种情况下,让nginx句柄在安全子域而不是rails上强制使用ssl会更好吗? 谢谢!
我正在开发一个Rails应用程序,当我在本地运行它时,它可以通过smtp通过Gmail帐户发送电子邮件。 当我把它移到我的服务器时,例如当我尝试创build一个新用户时,出现以下错误。 Net::SMTPAuthenticationError in UsersController#create 535-5.7.1 Username and Password not accepted.
我刚刚在CentOS服务器上的rails上安装了ruby,使用directadmin :http: //blog.ilwilliams.net/installing-rails-3-with-apache-on-centos/ 我现在在一个非特权用户帐户(没有sudo),并试图创build一个应用程序使用rails new personal 但是,这下面做 create vendor/assets/stylesheets create vendor/assets/stylesheets/.gitkeep create vendor/plugins create vendor/plugins/.gitkeep run bundle install Enter your password to install the bundled RubyGems to your system: Sorry, try again. Enter your password to install the bundled RubyGems to your system: joe is not in the sudoers file. This incident will be reported. […]
我需要build模使用Amazon AWS资源(EC2)进行video处理的Rails应用程序。 应用程序允许用户转换video。 video由用户上传。 现在它正在运行一个实例,但我看到需要扩大/改变的事情。 题: 创build两个实例是否有意义: 1)应用程序前端。 处理上传,数据库的东西。 2)video处理实例。 高内存的东西,正在被应用程序N1击中。 会更有效率吗? 有没有办法让实例N2工作不是不断的,而只是在需要处理video的时候? 我会看到任何好处,而不是扩大到更大的实例大小,并保持在同一个实例?
我正在pipe理一个服务器女巫主机在轨道网站上的几个ruby。 我需要为每个网站做cron工作: 发送电子邮件(通知) 创build缩略图 不幸的是,每次执行cron时,都占用了100%的CPU使用量,所以会减慢所有的网站。 我试图在我的crontab -e中使用nice命令: cd / home / www / manager && nice -n 19 / usr / local / bin / rake websites_cron RAILS_ENV =生产 但经过一段时间,我得到机架的过程和乘客过程与耙一样好的水平,所以它根本没有帮助… 这里是低使用率的htop输出http://img688.imageshack.us/img688/3637/capturedu20120807143520.png 当cron作业执行时,这里是htop http://img507.imageshack.us/img507/1736/capturedu20120807144808.png 谢谢 —编辑— 我在我的代码中有一个错误,正在重build所有的网站过程nice命令正在工作