我想用rails webapp发送邮件。 我build立了一个exim服务器,当查看日志时,发送的工作,但电子邮件不是真的发送。 我与另一个ISP有同样的问题。 发件人地址托pipe在另一个邮件服务器,其他ISP。 我认为问题是,发送不起作用,因为发件人地址不在同一台服务器上。 你有什么build议吗? 日志(exim)告诉我以下内容: 2011-01-01 14:38:06 1PZ1eo-0000Ga-38 <= <> R=1PZ1eo-0000GY-1p U=Debian-exim P=local S=1778 2011-01-01 14:38:08 1PZ1eo-0000Ga-38 => [email protected] R=dnslookup T=remote_smtp H=mx1.emailsrvr.com [98.129.184.131] X=TLS1.0:RSA_AES_256_CBC_SHA1:32 DN="C=US,O=mx1.emailsrvr.com,OU=GT21850092,OU=See www.geotrust.com/resources/cps (c)08,OU=Domain Control Validated – QuickSSL(R),CN=mx1.emailsrvr.com" 2011-01-01 14:38:08 1PZ1eo-0000Ga-38 Completed [email protected]是外部发件人地址。 编辑更多的细节 从命令行发送邮件时: echo "Test" | mail -s Testmail [email protected] 日志说 2011-01-01 20:45:24 1PZ7OG-0001Vp-Rx <= root@gustav U=root […]
我想在我的Debian挤压服务器上安装gitorious。 为此,我必须安装一些像Ruby的Ruby数据库驱动程序的gem。 我可以select使用Debian软件包,并通过apt-get或使用gem来安装它。 为了使后者工作,我安装了必要的MySQL开发包。 所以它现在工作正常。 我的问题是:从长远来看,更容易的事情是:使用像Ruby的Gem,Perl的CPAN等语言特定的包pipe理器,还是寻找这些扩展的Debian包更好? 我赞赏比我更好的pipe理员的想法和最佳做法。
我很抱歉,如果这是一个愚蠢的问题,但我不能让Ruby on Rails在我的Apache服务器上工作。 我正在使用Phusion Passenger(mod_rails,mod_rack)进行应用程序部署。 这是我的网站的Apacheconfiguration文件中的RoR特定的configuration代码: Alias /rails /var/www/syyborg.com/ruby/blog/public <Directory /var/www/syyborg.com/ruby/blog/public> Options FollowSymLinks AllowOverride None Order Allow,Deny Allow from All </Directory> RailsBaseURI /rails 我再次对这种事情了解甚less, 我从来没有从头开始build立一个服务器。 无论如何,正如你所看到的,我的rails应用程序位于/var/www/syyborg.com/ruby/blog/ 。 我试图从http://[my domain, syyborg.com]/rails访问它。 但是,当我尝试加载该网站时,出现“403 Forbidden”错误。 任何帮助将不胜感激,如果需要,我可以提供进一步的细节。 提前致谢!
在Solaris 10上,如何让mkmf使用gcc而不是/ opt / SUNWspro / bin / cc? 我想安装厨师使用gem安装厨师。 这是失败的: Building native extensions. This could take a while… ERROR: Error installing chef: ERROR: Failed to build gem native extension. /opt/csw/bin/ruby18 extconf.rb creating Makefile make /opt/SUNWspro/bin/cc -I. -I/opt/csw/lib/ruby/1.8/i386-solaris2.9 -I/opt/csw/lib/ruby/1.8 /i386-solaris2.9 -I. -I/opt/csw/include -D_FILE_OFFSET_BITS=64 -KPIC -xO3 -m32 -xarch=386 -KPIC -Wall -funroll-loops -c yajl.c make: /opt/SUNWspro/bin/cc: Command […]
我能够成功configurationnginx和乘客注册。 我现在有以下configuration server {listen 80 server_name **sub1.example.com** root /home/user/app1/public } server {listen 80 server_name **sub2.example.com** root /home/user/app2/public } 现在,我想将其更改为以下configuration server {listen 80 server_name **dev.example.com/example1** root /home/user/app1/public } server {listen 80 server_name **dev.example.com/example2** root /home/user/app2/public } 我尝试使用位置指令,但没有成功。 我甚至不确定这是否可能。 任何帮助将不胜感激。 谢谢。 以下是我的nginx.conf设置 server { listen 80; server_name dev.example.com; location = /app1/ { root /home/rails/app1/public/; passenger_enabled on; rails_env […]
我用三个apache虚拟主机运行Ubuntu 10.10。 我只是按照这个教程在Ubuntu上使用PAssenger和nginx设置Rails 3 。 除了rails / nginx,一切都运行良好。 当我尝试启动它时,我收到以下消息: * Starting Nginx Server… nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already […]
我遇到了EC2中两个实例之间的tcp连接问题。 起初我以为是我使用的工具(JRuby on Rails stack + MongoDB),当我在代码中看到以下exception时: A Mongo::OperationFailure occurred in foo#bar: Mongo::OperationFailure .bundle/jruby/1.8/gems/mongo-1.6.2/lib/mongo/util/tcp_socket.rb:76:in `read' 所以认为这是一个软件问题,我没有来到ServerFault。 我认为JRuby中的IO类在经过一些研究之后可能会被淘汰,但这并不准确。 我继续安装Ruby 1.9.3,并将整个堆栈移到它。 果然,过了一段时间,类似的例外就出现了: A Errno::ETIMEDOUT occurred in anotherfoo#anotherbar: Connection timed out mongo (1.6.2) lib/mongo/util/tcp_socket.rb:70:in `readpartial' 我来到服务器故障的原因是因为我相信这可能是亚马逊的基础设施的一些区域间超时问题,我想知道是否有任何可以validation或给我的build议,如何进一步debugging,因为我用尽了解决scheme。 我的应用程序服务器在我们东 – 1a。 mongodb服务器位于us-east-1c。 也许这可能是一个原因? 为什么我可以打赌使用默认的Amazon Linux AMI(64位,XLARGE)来获取这些超时?
我正在使用fnichol的chef-rvm cookbook通过rvm :: system配方通过RVM执行系统范围的Ruby安装。 即在我的运行列表中,我有(没有额外的属性设置): recipe[rvm::system] 在我做了我的Ubuntu服务器之后,一切正常的用户都能正常工作。 即 $ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] 但是,rvmsudo似乎并不能保留RVM环境,或者将其正确地传递给sudo。 我得到以下错误: $ rvmsudo ruby -v sudo: ruby: command not found 如何使用厨师来configuration我的环境,以便rvmsudo可以访问ruby / gem环境?
我正在对我的httpd和nginx虚拟主机confs进行puppetizing。 现在我有5个服务器,每个都有自己的端口,并运行在server1上,而nginx运行在server2上。 很明显,我需要保持对httpd和nginx的清单调用,因为它们可以在不同的服务器上运行。 我试图做的是共享两个清单之间的端口,所以我需要做的就是将我想要的虚拟主机的名称传递给httpd和nginx,它将在中心位置查找端口。 我正在尝试实现一个自定义函数,目前有这样的设置: # /path/to/puppet/modules/global/lib/puppet/parser/functions/app_to_port.rb module Puppet::Parser::Functions newfunction(:app_to_port, :type => :rvalue) do |args| case args[0] when app_1 return 27960 when app_2 return 27961 end end end # /path/to/puppet/modules/httpd/manifests/vhost/conf.pp … $vhost_port = app_to_port($name) … 我一直遇到各种问题,$ name我一直得到undefined local variable or method 'app_1'错误,如果我传入一个int, $vhost_portvariables永远不会得到一个值。 我是新来的ruby和傀儡,这导致我相信我缺less一些语言或应用程序构造。 我运行ruby -rpuppet /path/to/app_to_port.rb时没有任何回应,这让我相信代码在语法上是正确的。 为了logging,我正在阅读http://docs.puppetlabs.com/guides/custom_functions.html和https://stackoverflow.com/questions/948135/how-to-write-a-switch-statement-in – 让我知道这一点。 目前env:ruby1.8.7和木偶2.7.19
我在轨道应用程序ubuntu 10.04 ec2实例上运行我的ruby,我正在使用nginx 1.2.4。 我想configurationmunin从nginx获取统计信息,我已经重新编译了nginx并且工作正常,但是我无法运行munin。 如果我打mydomain.com/munin/我得到错误404页面未find。 另外,我已经安装了所有必要的插件,如nginx-stats,nginx-memory等等。 谷歌search并不唯一我的问题,因为人们build议添加configuration设置的网站,可用/默认,但我的Nginx没有任何这样的types的文件夹。 请帮助我