Articles of ruby on rails

lighttpd无法启动fastcgi后端。 我怎样才能解决这个问题?

我尝试在lighttpd上运行rails应用程序,但服务器无法启动,因为fastcgi-backend无法启动。 这是lighttpd的错误日志: 2011-08-02 20:43:15: (log.c.166) server started 2011-08-02 20:43:15: (mod_fastcgi.c.1104) the fastcgi-backend /opt/gemeinschaft/public/dispatch.fcgi failed to start: 2011-08-02 20:43:15: (mod_fastcgi.c.1108) child exited with status 13 /opt/gemeinschaft/public/dispatch.fcgi 2011-08-02 20:43:15: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version. If this is PHP on Gentoo, add 'fastcgi' to […]

nginx上传模块+ rails + pupload(jQuery多重上传插件)多个uplosding之间挂起

我已经configurationnginx的nginx上传模块+乘客在Ubuntu操作系统轨道2.3.5。 我使用的是multithreading(jQuery多重上传插件),但它挂起后2或3file upload,但是当我从nginx.conf中删除nginx上传模块,并重新启动nginx它工作正常。 这是我的nginx.conf文件 server { listen 8081; # server_name video.local; server_name 127.0.0.1; root /home/livia/Work/test/pulpload_rails2/public; # <— be sure to point to 'public'! passenger_enabled on; client_max_body_size 1000m; rails_env development; location /folders/do_multiple_upload { # pass request body to here upload_pass @fast_upload_endpoint; upload_store /home/livia/Work/test/pulpload_rails2/temp_files/; upload_set_form_field asset[][original_name] "$upload_file_name"; upload_set_form_field asset[][content_type] "$upload_content_type"; upload_set_form_field asset[][filepath] "$upload_tmp_path"; # Inform backend about […]

Rails程序不在apache +乘客目录列表上运行

我在Linux Debian 6上成功安装了Phusion乘客+ Apache 2 + Rails 3.1程序+ git。我运行了passenger-install-apache2-module并遵循configuration说明。 我也遵循https://help.ubuntu.com/community/RubyOnRails#Configure%20Apache中的设置说明 我的程序是在/ var / www / myrailsproject,并在我的Mac上运行罚款webrick。 当去myhomepage.com (例如)我只看到目录列表。 通过阻止目录列表并在/ etc / apache2 / sites-available default或myhomepage.com中的<Document>标记中设置Options -Indexes我在我的网站上遇到错误: 禁止您无权访问/在此服务器上。 Apache / 2.2.19(Debian)服务器在myhomepage.com端口80 在/etc/apache2/apache.conf中我添加了: ServerName myhomepage.com LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8 PassengerRuby / usr /bin/ruby1.8 在/ etc / apache2 / sites-available myhomepage.com : <VirtualHost *:80> ServerName myhomepage.com ServerAlias […]

Apache,Passenger,Rails 3.1 – 根据要求,间歇性长时间停顿

我有一个3.1.0 Rails应用程序(机架1.3.3)运行在一个Cantos 5.6虚拟机使用Apache和Passenger 3.0.9 – 所有最近安装。 一切都完美无缺,除非偶尔会有一些请求长时间延迟。 大多数时候,相同的请求很快。 它发生在POST和GET请求上。 对于一个随机的长延迟请求,apache access_log,error_log和rails日志都会立即响应tail -f。 但是在浏览器中的响应是非常迟缓的。 在Chrome中,networking时间轴图表显示,它正在等待很长一段时间(15秒)。 在延迟之后,所有的东西都照常显示。 apache error_log显示了这样的行: cache: [GET /subprojects/new] miss 这可能是问题吗? 可能是什么原因/修复? 我不确定问题出在哪里,所以不知道接下来要做什么。 任何想法或build议? 提前谢谢了。 🙂

.htaccess重写和Ruby on Rails / Redmine的问题

我安装了Redmine,到目前为止一切运行顺利。 现在我想通过.htaccess添加一个重写规则,以便将来自domain.tdl的请求redirect到www.domain.tdl。 这是方法很好,我的日常php项目: RewriteEngine On RewriteBase / # redirect all pages w/o www to www. RewriteCond %{HTTP_HOST} !^www\.domain\.tdl$ RewriteRule ^(.*)$ http://www.domain.tdl/$1 [L,R=301] 但是,当我把它添加到我们的redmine / public / .htaccess似乎无限redirect(导致超时/ HTTP 500错误)。 我试图寻找一个解决scheme的论坛/谷歌,但我只发现了成千上万的矛盾意见: 轨道上的ruby和.htaccess不能一起工作 ruby在轨道上和.htaccess一起工作 你必须编辑你的应用程序控制器 你必须编辑你的mongelconfiguration 等等… 我错过了什么吗? 我不知道我想编辑我的应用程序控制器,我很确定我没有访问任何Mongoconfiguration(托pipe服务器托pipe)。

如何在Hetzner服务器上安装bundler gem?

我正在尝试使用以下命令安装bundler: gem install bundler 但是收到这个错误: ERROR: could not find gem bundler locally or in a repository 运行命令 gem list –local 给我看空列表和 gem sources 显示这个: http://gems.rubyforge.org/ http://rubygems.org/ http://gemcutter.org 我试图find类似的问题一个小时,但在我看来,我不了解一些基本原则,使正确的谷歌search查询。

将rails / rake应用程序迁移到新服务器而不重置所有密码

我不是一个Rails的人,所以这可能是一个明智之举: 我们在一个模拟乘客环境中运行Chili Project进行项目pipe理,使用MySQL作为数据库。 我们从Redmine移动了一次服务器,现在我想迁移到虚拟机。 我有虚拟机启动并运行,但是 – 像上次一样 – 用户名/密码组合不能没有重置 。 我猜这意味着有一个存储的秘密,需要也复制到新的服务器,但我不知道这是什么/在哪里。 任何Rails / Rake大师对我来说都有一个简单的答案?

Linode Debian + rvm + nginx + Unicorn杀死主引导或不启动独angular兽

我是一个运行Debian 6的新Linode / Linux用户。我试图让我的Unicorn服务器在启动时启动,但由于某种原因,它不是,我无法追查任何错误信息。 Nginx开始正常,我有一个多用户RVM安装。 我的直觉是这与RVM有关。 这是/rails/todo我的unicorn_init.sh文件,在/etc/init.d/unicorn有一个符号链接: # unicorn_init.sh #!/bin/sh set -e TIMEOUT=${TIMEOUT-60} APP_ROOT=/rails/todo PID=$APP_ROOT/tmp/pids/unicorn.pid CMD="$APP_ROOT/bin/unicorn_rails -D -c $APP_ROOT/config/unicorn.rb -E production" GEM_HOME="/usr/local/rvm/gems/ruby-1.9.2-p290@global" action="$1" set -u old_id="$PID.oldbin" cd $APP_ROOT || exit 1 export GEM_HOME=$GEM_HOME sig () { test -s "$PID" && kill -$1 `cat $PID` } oldsig () { test -s $old_pid && kill -$1 `cat […]

如何使用nginx,rails和uploadify上传大文件(大于1MB)

我有我的生产nginxconfiguration的问题(在我的开发机与杂种的一切工作)。 我的环境是:nginx作为代理,rainbows作为后台运行轨道3.1应用程序与ruby1.9.2。 当我试图上传大文件(大于1MB)时,在我的网站和nginx错误日志文件中看到502错误: 2012/04/02 14:45:17 [error] 14415#0: *658 sendfile() failed (32: Broken pipe) while sending request to upstream, …. 我试过了: 设置client_max_body_size 5m; keepalive_timeout 600; 上传较小的文件正常工作。 可能是什么问题呢?

如何将安全请求redirect到nginx中的另一个子域

我一直在寻找相当长的这一个,但我似乎没有看到作品的权利 – 也许我不是在寻找正确的事情。 无论如何,我们有一个www.example.com和一个secure.example.com。 我能够成功地将不安全的请求redirect到安全子域上的SSL,但我在将www子域上的安全请求redirect到安全子域时遇到问题。 以下是我的nginx.conf – 任何人都可以帮我一把吗? 谢谢! worker_processes 4; error_log /var/log/nginx/error.log; events { worker_connections 4096; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; gzip_static on; gzip_min_length 1000; gzip_proxied expired no-cache no-store private auth; gzip_types text/plain application/xml; gzip_disable "MSIE [1-6]\."; gzip_vary on; upstream example { server unix:/home/deploy/tmp/sockets/unicorn.sock; } server […]