我看过其他类似的问题,但没有一个答案满意,所以这里就是了。 我已经安装了Ruby,Rails,Nginx和Passenger,并试图将其configuration为一起工作。 这是/opt/nginx/conf/nginx.conf的相关部分 server { listen 80; server_name .myapp.dev; # There is an entry in my local /etc/hosts file for this passenger_enabled on; root /srv/www/myapp.dev/public; access_log /srv/www/myapp.dev/logs/access_log; error_log /srv/www/myapp.dev/logs/error_log warn; } 有另一个server块,但是这是监听localhost所以我不认为这是造成任何问题。 这里是ls -la /srv/www/myapp.dev/的输出 drwxr-xr-x 3 josh josh 4096 Dec 4 19:12 . drwxr-xr-x 3 josh josh 4096 Dec 4 18:34 .. drwxr-xr-x 2 […]
我试图学习木偶,我不明白如何设置模板erbselect默认值,如果variables没有在common.yaml或node.yaml中定义。 这是我曾经试过的:1) # we don't need to run the embedded HTTP server here <% if @elasticsearch_http_enabled %> elasticsearch_http_enabled = <%= @elasticsearch_http_enabled %> <% else %> #elasticsearch_http_enabled = false <% end %> 2) # we don't need to run the embedded HTTP server here <%- if @elasticsearch_http_enabled then -%> elasticsearch_http_enabled = <%= @elasticsearch_http_enabled %> <% else […]
我试图在我的Digital Ocean VPS上部署我的Rails应用程序,但是当我访问IP地址时,我得到了一个403。 这是我的错误日志的输出: [ 2014-11-02 04:18:12.0511 23504/7f64e6a36780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.53', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' […]
我正在运行一个debian服务器,并在一段时间后升级所有的软件包( apt-get update , apt-get upgrade , apt-get distro-upgrade )。 然后rmagick没有工作,因为imagemagick更新。 所以我跑了: gem uninstall rmagick bundle install 然后我得到这个: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for Ruby version >= 1.8.5… yes checking for gcc… yes checking for Magick-config… no Can't install RMagick 0.0.0. Can't find Magick-config in /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games *** extconf.rb failed […]
我在HPCloud.com上创build了一个Ubuntu 14.04虚拟机来练习厨师。 在此之后,我在HPCloud上设置DNS,并将/ etc / hosts中的主机名设置为chef-server.mydomain.com 运行时 chef-server-ctl user-create user_name first_name last_name email password –filename FILE_NAME 我越来越 ERROR: Connection refused connecting to https://127.0.0.1/users/, retry 1/5 它重试5次,失败。 我的设置有什么问题?
我正在Digital Ocean部署一个Rails应用程序( Fedena项目 )给VPS。 我可以使用mongrel_rails start和ruby script/server启动我的应用程序没有问题。 它绑定到端口:3000,我可以根据需要使用该应用程序。 问题是用Phusion Passenger,但是我已经安装了gemgem install passenger但是当我运行passenger start从我的Rails应用程序根目录开始时,有一个权限问题,似乎并不是Mongrel或Webrick的情况: =============== Phusion Passenger Standalone web server started =============== PID file: /root/fedena/tmp/pids/passenger.80.pid Log file: /root/fedena/log/passenger.80.log Environment: production Accessible via: http://0.0.0.0:3000/ You can stop Phusion Passenger Standalone by pressing Ctrl-C. Problems? Check https://www.phusionpassenger.com/documentation/Users%20guide%20Standalone.html#troubleshooting =============================================================================== 2015/03/08 01:35:03 [error] 18827#0: *4 directory index of "/root/fedena/public/" is […]
我是服务器pipe理新手,最近在Linode服务器上设置了我的Rails应用程序。 我跟随Ryan Bates在这个问题上的类似configuration。 用nginx,独angular兽和Ubuntu 14.04.2。 这与一个应用程序很好。 但我想在同一台服务器上设置一个中转站点。 这只是一个小的应用程序,使用很less的资源,这应该保持低成本。 我如何去做这件事? 我已经configuration和上传两个应用程序到我的根目录(应用程序和分期)。 但是我只有一个IP地址。 我如何configuration一个DNSlogging到应用程序,另一个是登台? 我甚至不知道在浏览器中使用哪个IP地址来访问我的登台服务器。 任何帮助将非常感激!
这似乎应该是显而易见的,但我一直没有find办法做到这一点。 我的基本问题是:我已经在Scientific Linux 6系统上安装了Ruby 1.8.7(从基础知识库)。 我试图通过gem install来安装一些gem,但是我遇到了很多需要ruby 1.9或更高版本的gem。 我可以通过-v参数指定单独的gem版本,但是gem install似乎总是select可用于任何gem依赖项的最高版本,所以即使我限制了我想要的gem版本,我的安装仍然会失败,因为其中一个依赖关系将需要Ruby 1.9。 我想要的一些gem的依赖树是深广的; 需要花费大量的时间来手动确定我需要的每个依赖关系的版本,然后手动安装每个所需的gem,然后才能按我所需的方式工作。 (这是依赖pipe理应该解决的问题。) 所以:有没有办法告诉Ruby,“只安装gem foo ,只能用于当前安装版本的Ruby”? (甚至,“安装gem foo的 xyz版本,只使用可与当前安装的Ruby版本兼容的gem”?) 正如我所提到的,我碰巧在Scientific Linux 6上运行Ruby 1.8.7,但是我怀疑任何解决scheme都将是特定于平台的。
我知道如果对Rails \ Ruby应用程序进行更改,则需要重新启动mongrel以查看更改才能生效。 我只是好奇,如果杂种实际上使用应用程序的编译版本,而不是像在PHP通常完成飞行解释它?
我试过这个,但它没有工作,似乎是为OSX。 我有一个新鲜的Ubuntu 10.10(x64)与rvm,rails 3和ruby 1.9.2安装。 我有一个新的导轨应用程序,但使用gem或导轨导致以下警告(滞后)。 $ rails -v /home/chance/.rvm/gems/ruby-1.9.2-p180@global/gems/railties-3.0.5/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /home/chance in PATH, mode 040777 /home/chance/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /home/chance in PATH, mode 040777 Rails 3.0.5 $ gem -v /home/chance/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /home/chance in PATH, mode 040777 1.6.2 只要事情重要,这里是我的Gemfile: source 'http://rubygems.org' gem 'rails' # Bundle […]