How to configure port server in Rails 5.1 - ruby-on-rails

I need to configure the server port in config/boot.rb file. Looking at lib/rails/commands/server/server_command.rb we have this:
125 def perform
126 set_application_directory!
127 Rails::Server.new(server_options).tap do |server|
128 # Require application after server sets environment to propagate
129 # the --environment option.
130 require APP_PATH
131 Dir.chdir(Rails.application.root)
132 server.start
133 end
134 end
135
136 no_commands do
137 def server_options
138 {
139 user_supplied_options: user_supplied_options,
140 server: #server,
141 log_stdout: #log_stdout,
142 Port: port,
143 Host: host,
144 DoNotReverseLookup: true,
145 config: options[:config],
146 environment: environment,
147 daemonize: options[:daemon],
148 pid: pid,
149 caching: options["dev-caching"],
150 restart_cmd: restart_command
151 }
152 end
153 end
How can I configure Port from config/boot.rb then?
Thanks in advance.

I also tried to monkey patch boot.rb to change port, but no luck. Upon browsing I learned that Rails 5 comes with puma, which is configured in config/puma.rb. You can change the default port number in that file, or override it by setting the PORT environment variable before starting rails.
config/puma.rb
# Specifies the `port` that Puma will listen on to receive requests;
# default is 3000.
port ENV.fetch("PORT") { 3000 }
I hope this helps.

Related

webApp not loading Passenger + nginx + ruby 2.6.8 + rails 6.0.4 #digitalOcean

I recently upgrade ruby version and Rails version to 2.6.8 and 6.0.4 respectively, the app is running fine when I run it through "rails start" command, but when we invoke it through passenger through nginx then the app does not load and throws errors.
I used rvm to install ruby-2.6.8,
I used rvmsudo to start nginx: rvmsudo service nginx start/restart.
I Used latest bundler which was giving bundler version issue and then I downgraded it to bundler-1.17.3 then bundler version issue resolved but this issue came.
nginx - 1.14.x
passenger- 6.0.10
ruby- 2.6.8
rails- 6.0.4
[passenger_native_support.so] trying to compile for the current user (nobody) and Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Warning: compilation didn not succeed. To learn why, read this file:
/tmp/passenger_native_support-1s7i1rz.log
[passenger_native_support.so] finding downloads for the current Ruby interpreter...
(set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
Could not download https://github.com/phusion/passenger/releases/download/release-6.0.10/rubyext-ruby-2.6.8-x86_64-linux.tar.gz: The requested URL returned error: 404
Trying next mirror...
Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/6.0.10/rubyext-ruby-2.6.8-x86_64-linux.tar.gz: The requested URL returned error: 404
Trying next mirror...
Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/6.0.10/rubyext-ruby-2.6.8-x86_64-linux.tar.gz: The requested URL returned error: 403 Forbidden
[passenger_native_support.so] will not be used (can not compile or download)
--> Passenger will still operate normally.
Unable to autodetect the currently active RVM gem set name. This could happen if you ran this program using "sudo" instead of "rvmsudo". When using RVM, you are always supposed to use "rvmsudo" instead of "sudo!".
Please try rerunning this program using "rvmsudo". If that does not help, please contact this programs author for support.
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb:82: [BUG] Segmentation fault at 0x00007f53c62fb210
ruby 2.6.8p205 (2021-07-07 revision 67951) [x86_64-linux]
-- Ruby level backtrace information ----------------------------------------
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in "<main>"
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in "<module:PhusionPassenger>"
/usr/share/passenger/helper-scripts/rack-preloader.rb:188:in "<module:App>"
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:390:in "run_block_and_record_step_progress"
/usr/share/passenger/helper-scripts/rack-preloader.rb:189:in "block in <module:App>"
/usr/share/passenger/helper-scripts/rack-preloader.rb:91:in "preload_app"
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in "run_load_path_setup_code"
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:536:in "running_bundler"
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:541:in "rescue in running_bundler"
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb:82:in "ruby_command"
-- Machine register context ------------------------------------------------
RIP: 0x00007f4bc7875b7d RBP: 0x00000007fffffff0 RSP: 0x00007ffe0577d4f0
RAX: 0x000055bee28728e0 RBX: 0x00007f53c62fb210 RCX: 0x00007f53c62fb218
RDX: 0x00007f4bc62fb220 RDI: 0x00007f4bc63fada8 RSI: 0x00007f4bc63fada8
R8: 0x000055bee202a350 R9: 0x000055bee20a02e8 R10: 0x00007f4bc63fada8
R11: 0x00007f4bc62fb219 R12: 0x00000000fffffffe R13: 0x00007f4bc62fb218
R14: 0x00007f4bc7b90b98 R15: 0x0000000000000000 EFL: 0x0000000000010202
-- C level backtrace information -------------------------------------------
/usr/local/rvm/rubies/ruby-2.6.8/bin/../lib/libruby.so.2.6(rb_vm_bugreport+0x769) [0x7f4bc78859d9] vm_dump.c:715
/usr/local/rvm/rubies/ruby-2.6.8/bin/../lib/libruby.so.2.6(rb_bug_context+0xe7) [0x7f4bc76c7777] error.c:609
/usr/local/rvm/rubies/ruby-2.6.8/bin/../lib/libruby.so.2.6(sigsegv+0x42) [0x7f4bc77ece72] signal.c:998
/lib/x86_64-linux-gnu/libc.so.6(0x7f4bc7259040) [0x7f4bc7259040]
/usr/local/rvm/rubies/ruby-2.6.8/bin/../lib/libruby.so.2.6(rb_vm_exec+0x72d) [0x7f4bc7875b7d] vm.c:2094
/usr/local/rvm/rubies/ruby-2.6.8/bin/../lib/libruby.so.2.6(ruby_exec_internal+0xd6) [0x7f4bc76ce516] eval.c:262
/usr/local/rvm/rubies/ruby-2.6.8/bin/../lib/libruby.so.2.6(ruby_exec_node+0x1d) [0x7f4bc76d0bed] eval.c:326
/usr/local/rvm/rubies/ruby-2.6.8/bin/../lib/libruby.so.2.6(ruby_run_node+0x2e) [0x7f4bc76d41ae] eval.c:318
/usr/local/rvm/rubies/ruby-2.6.8/bin/ruby(main+0x5b) [0x55bee0a2a94b] ./main.c:42
-- Other runtime information -----------------------------------------------
* Loaded script: Passenger AppPreloader: /home/twirll/web/apps/twirllapp
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
5 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
6 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/rbconfig.rb
7 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/compatibility.rb
8 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/defaults.rb
9 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/deprecate.rb
10 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/errors.rb
11 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/version.rb
12 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/requirement.rb
13 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/platform.rb
14 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/basic_specification.rb
15 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/stub_specification.rb
16 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/delegate.rb
17 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/rfc2396_parser.rb
18 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/rfc3986_parser.rb
19 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/common.rb
20 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/generic.rb
21 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/file.rb
22 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/ftp.rb
23 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/http.rb
24 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/https.rb
25 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/ldap.rb
26 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/ldaps.rb
27 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri/mailto.rb
28 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/uri.rb
29 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/specification_policy.rb
30 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/util/list.rb
31 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/stringio.so
32 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/specification.rb
33 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/exceptions.rb
34 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/util.rb
35 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/bundler_version_finder.rb
36 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/dependency.rb
37 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb
38 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/monitor.rb
39 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb
40 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/core_ext/kernel_warn.rb
41 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems.rb
42 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/path_support.rb
43 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/version.rb
44 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb
45 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/levenshtein.rb
46 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/jaro_winkler.rb
47 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checker.rb
48 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
49 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
50 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
51 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
52 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/key_error_checker.rb
53 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/null_checker.rb
54 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/formatters/plain_formatter.rb
55 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean.rb
56 /usr/lib/ruby/vendor_ruby/phusion_passenger.rb
57 /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb
58 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/fileutils/version.rb
59 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/etc.so
60 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/fileutils.rb
61 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/tmpdir.rb
62 /usr/lib/ruby/vendor_ruby/phusion_passenger/constants.rb
63 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/base64.rb
64 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb
65 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tmpio.rb
66 /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb
67 /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/operating_system.rb
68 /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/ruby.rb
69 /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/binary_compatibility.rb
70 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/shellwords.rb
71 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/shellwords.rb
72 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/logger.rb
73 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/download.rb
74 /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb
75 /usr/lib/ruby/vendor_ruby/phusion_passenger/preloader_shared_helpers.rb
76 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/strscan.so
77 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/forwardable/impl.rb
78 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/forwardable.rb
79 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/json.rb
80 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/socket.so
81 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/io/wait.so
82 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/socket.rb
83 /usr/lib/ruby/vendor_ruby/phusion_passenger/public_api.rb
84 /usr/lib/ruby/vendor_ruby/phusion_passenger/debug_logging.rb
85 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/pathname.so
86 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/pathname.rb
87 /usr/lib/ruby/vendor_ruby/phusion_passenger/ruby_core_enhancements.rb
88 /usr/lib/ruby/vendor_ruby/phusion_passenger/ruby_core_io_enhancements.rb
89 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/x86_64-linux/fcntl.so
90 /usr/lib/ruby/vendor_ruby/phusion_passenger/message_channel.rb
91 /usr/lib/ruby/vendor_ruby/phusion_passenger/message_client.rb
92 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/native_support_utils.rb
93 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/unseekable_socket.rb
94 /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb
95 /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb
96 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tee_input.rb
97 /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb
98 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/version.rb
99 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/compatibility_guard.rb
100 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/constants.rb
101 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/text.rb
102 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/user_interaction.rb
103 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/config_file.rb
104 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/rubygems_integration.rb
105 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/current_ruby.rb
106 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/shared_helpers.rb
107 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/ext/builder.rb
108 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb
109 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendored_fileutils.rb
110 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/errors.rb
111 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/environment_preserver.rb
112 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/plugin/api.rb
113 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/plugin.rb
114 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/source/git.rb
115 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/source/installed.rb
116 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/source/specific_file.rb
117 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/source/local.rb
118 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/source/lock.rb
119 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/source/vendor.rb
120 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/rubygems/source.rb
121 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/gem_helpers.rb
122 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/match_platform.rb
123 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/rubygems_ext.rb
124 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/build_metadata.rb
125 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler.rb
126 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/settings.rb
127 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/ui.rb
128 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/ui/silent.rb
129 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/ui/rg_proxy.rb
130 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/feature_flag.rb
131 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/source.rb
132 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/source/path.rb
133 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/source/git.rb
134 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/source/rubygems.rb
135 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/lockfile_parser.rb
136 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/set.rb
137 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/definition.rb
138 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/dependency.rb
139 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/ruby_dsl.rb
140 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/dsl.rb
141 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/source_list.rb
142 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/source/metadata.rb
143 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/ruby_version.rb
144 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/lazy_specification.rb
145 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/index.rb
146 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb
147 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/spec_set.rb
148 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/compatibility.rb
149 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
150 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
151 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/errors.rb
152 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb
153 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
154 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
155 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
156 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
157 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb
158 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb
159 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb
160 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
161 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
162 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/state.rb
163 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
164 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
165 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/resolution.rb
166 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/resolver.rb
167 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
168 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendor/molinillo/lib/molinillo.rb
169 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/vendored_molinillo.rb
170 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/resolver/spec_group.rb
171 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/resolver.rb
172 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/source/gemspec.rb
173 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/runtime.rb
174 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/dep_proxy.rb
175 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/remote_specification.rb
176 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/stub_specification.rb
177 /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/2.6.0/bundler/endpoint_specification.rb
I also checked this log file /tmp/passenger_native_support-1s7i1rz.log
# current user is: nobody
# mkdir -p /nonexistent/.passenger/native_support/6.0.10/ruby-2.6.8-x86_64-linux
Encountered permission error, but no more directories to try. Giving up.
-------------------------------
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 3.0.3.1
- RUBY VERSION: 2.6.8 (2021-07-07 patchlevel 205) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.6.8
- USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.6.0
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.6.8/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.6.8/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-2.6.8
- /usr/local/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-document"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/rvm/gems/ruby-2.6.8/bin
- /usr/local/rvm/gems/ruby-2.6.8#global/bin
- /usr/local/rvm/rubies/ruby-2.6.8/bin
- /usr/local/rvm/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
- /snap/bin
Can someone please help me here, I am kind of stuck in this activity.
let me know if need any other information.
I checked the log in detail,
on the 4th line the below log file was mentioned, it had captured the error, and the error was about a permission of a folder so that certain files can be written into it.
/tmp/passenger_native_support-1s7i1rz.log
I hope this helps someone who is looking for similar problem. the characters at last in filename 1s7i1rz may vary everytime this problem appears.

Sidekiq throws Redis::CommandError

I have this redis container I use for Sidekiq/Rails and also set up rabbitmq a few days ago on the same docker host. Ever since I keep getting these errors:
UNBLOCKED force unblock from blocking operation, instance state changed (master -> slave?)
redis/client.rb in call at line 126
def call(command)
reply = process([command]) { read }
raise reply if reply.is_a?(CommandError)
if block_given?
yield reply
redis/client.rb in block in call_with_timeout at line 219
redis/client.rb in with_socket_timeout at line 292
redis/client.rb in call_with_timeout at line 218
redis.rb in block in _bpop at line 1186
redis.rb in block in synchronize at line 52
monitor.rb in mon_synchronize at line 226
redis.rb in synchronize at line 52
redis.rb in _bpop at line 1183
redis.rb in brpop at line 1228
redis/namespace.rb in call_with_namespace at line 469
redis/namespace.rb in block (2 levels) in <class:Namespace> at line 349
sidekiq/fetch.rb in block in retrieve_work at line 37
sidekiq.rb in block in redis at line 97
connection_pool.rb in block (2 levels) in with at line 65
connection_pool.rb in handle_interrupt at line 64
connection_pool.rb in block in with at line 64
connection_pool.rb in handle_interrupt at line 61
connection_pool.rb in with at line 61
sidekiq.rb in redis at line 94
sidekiq/fetch.rb in retrieve_work at line 37
sidekiq/processor.rb in get_one at line 83
sidekiq/processor.rb in fetch at line 95
sidekiq/processor.rb in process_one at line 77
sidekiq/processor.rb in run at line 68
sidekiq/util.rb in watchdog at line 15
sidekiq/util.rb in block in safe_thread at line 24
The redis logs show nothing relevant, just the "save database" stuff.
Have I done something evil getting them both set up within the same host?
Turns out someone removed a firewall rule so the redis port was exposed to datacenter-wide VLAN.
And since the datacenter where that machine lives have promised 3 years ago they will be releasing a feature where each customer/account can have their own separate VLAN, they have yet to and some of their customers seem to be up to no good.
The error I was seeing was someone probing ports and trying all sorts of remote exploits.
After adding the firewall rule back up, the error disappeared.

Ruby Could not initialize MySQL client library

I updated my ruby on Bluehost following the guide below.
http://www.haydonryan.com/installing-ruby-2-1-1p76-and-rails-4-0-4-on-bluehost/
http://www.haydonryan.com/rails-4-passenger-and-bluehost-with-a-cameo-from-wordpress/
Then I installed redmine using the guide from bluehost.
If I run rails s through ssh, I get
=> Booting WEBrick
=> Rails 4.2.4 application starting in development on localhost 3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
[2015-10-13 06:45:51] INFO WEBrick 1.3.1
[2015-10-13 06:45:51] INFO ruby 2.2.3 (2015-08-18) [x86_64-linux]
[2015-10-13 06:45:51] INFO WEBrick::HTTPServer#start: pid=19685 port=3000
However, if I open the url from my browser, I get the error message below. What could be causing this?
Error message: Could not initialize MySQL client library Exception
class: RuntimeError Application root: /home/user/rails_apps/redmine
Backtrace:
# File Line Location
0 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
274 in require
1 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
274 in block in require
2 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
240 in load_dependency
3 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
274 in require
4 /home/user/ruby/gems/gems/mysql2-0.3.20/lib/mysql2.rb 31 in
5 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 76 in require
6 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 76 in block (2 levels) in require
7 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 72 in each
8 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 72 in block in require
9 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 61 in each
10 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 61 in require
11 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler.rb 134 in require
12 /home5/user/rails_apps/redmine/config/application.rb 5 in
13 /home5/user/rails_apps/redmine/config/environment.rb 2 in require
14 /home5/user/rails_apps/redmine/config/environment.rb 2 in
15 config.ru 3 in require
16 config.ru 3 in block in
17 /home/user/ruby/gems/gems/rack-1.6.4/lib/rack/builder.rb 55 in instance_eval
18 /home/user/ruby/gems/gems/rack-1.6.4/lib/rack/builder.rb 55 in initialize
19 config.ru 1 in new
20 config.ru 1 in
21 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
225 in eval
22 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
225 in load_rack_app
23 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
157 in block in initialize_server
24 /etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb 563 in report_app_init_status
25 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
154 in initialize_server
26 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
204 in start_synchronously
27 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
180 in start
28 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
129 in start
29 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
253 in block (2 levels) in spawn_rack_application
30 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
132 in lookup_or_add
31 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
246 in block in spawn_rack_application
32 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
82 in block in synchronize
33 prelude> 10:in synchronize
34 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
79 in synchronize
35 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
244 in spawn_rack_application
36 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
137 in spawn_application
37 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
275 in handle_spawn_application
38 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
357 in server_main_loop
39 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
206 in start_synchronously
40 /etc/httpd/modules/passenger/helper-scripts/passenger-spawn-server 99
in

Vagrant slowing down http requests to rails server

I have a project (Rails 4.0.2) that I'm currently running inside of Vagrant (1.3.5) running VirtualBox (4.3.4). The Guest OS is Debian 6.0. When I run the application on the Host OS, or I start up the Virtualbox manually, I see a dramatic improvement in responsiveness. As soon as I use 'vagrant up', performance seems to become really poor. Here are the relevant Apache Bench results:
Apache Bench Command
ab -n 10 -c 1 http://127.0.0.1:3000/application.js
Host OS
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 27 44 28.3 33 118
Waiting: 25 41 28.6 31 116
Total: 27 44 28.3 33 118
Virtualbox
min mean[+/-sd] median max
Connect: 0 0 0.4 0 1
Processing: 57 71 19.1 67 119
Waiting: 46 59 19.3 57 110
Total: 57 71 19.1 68 119
Vagrant
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 849 916 76.2 901 1115
Waiting: 831 892 72.6 883 1081
Total: 849 916 76.2 901 1115
I would expect a slowdown running the application in Virtualbox, but not an order of magnitude. I'm also not doing anything fancy with my Vagrantfile:
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "squeeze"
config.vm.network :forwarded_port, guest: 3000, host: 3000
end
I've tried the fixes specified in this github issue and this HackerNews comment but to no avail.
Make sure you don't place your project in synced folder (by default it uses vboxsf which has known performance issues with large numbers of files/directories).
This may also be related to "Webrick Reverse DNS Lookup", take a look at https://stackoverflow.com/a/19284483/1801697
Hope it helps.

Rails, Passenger and Memcached: Unable to find server during initialization

I hope someone can help me with a problem that I am certain is a user error.
The configuration details below work in all my other environments including integration, development and qa. However, the production servers give the following error:
<ActionController::Session::MemCacheStore:0x2b45f6acb248> unable to find server during initialization.
When I telnet to the memcached box from the server having the problem and run 'stats', I get:
STAT pid 16136
STAT uptime 7398638
STAT time 1275059978
STAT version 1.2.8
STAT pointer_size 64
STAT rusage_user 7.085922
STAT rusage_system 13.275981
STAT curr_items 10878
STAT total_items 11441
STAT bytes 2020180
STAT curr_connections 5
STAT total_connections 306
STAT connection_structures 11
STAT cmd_flush 0
STAT cmd_get 457326
STAT cmd_set 11441
STAT get_hits 412184
STAT get_misses 45142
STAT evictions 0
STAT bytes_read 22600329
STAT bytes_written 53036649
STAT limit_maxbytes 30064771072
STAT threads 5
STAT accepting_conns 1
STAT listen_disabled_num 0
Below are the configuration details and stacktrace.
config/environment.rb (the important parts):
config.action_controller.session_store = :mem_cache_store
config.gem "memcache-client", :lib => 'memcache'
config/environments/production.rb:
config.cache_store = :mem_cache_store
require 'memcache'
# Caching
# Memcached configuration
memcache_options = {
:c_threshold => 100_000,
:compression => true,
:debug => false,
:namespace => 'gucci',
:readonly => false,
:urlencode => false,
:multithread => true
}
CACHE = MemCache.new memcache_options
CACHE.servers = ['10.x.x.x:11211']
Stacktrace:
/var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb 20 in `initialize'
1 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb 72 in `new'
2 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb 72 in `build'
3 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb 116 in `build'
4 /var/www/oro/production/releases/20100528130253/vendor/rails/activesupport/lib/active_support/inflector.rb 361 in `inject'
5 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb 116 in `each'
6 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb 116 in `inject'
7 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb 116 in `build'
8 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/dispatcher.rb 130 in `build_middleware_stack'
9 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/dispatcher.rb 81 in `initialize'
10 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/dispatcher.rb 51 in `new'
11 /var/www/oro/production/releases/20100528130253/vendor/rails/actionpack/lib/action_controller/dispatcher.rb 51 in `run_prepare_callbacks'
12 /var/www/oro/production/releases/20100528130253/vendor/rails/railties/lib/initializer.rb 631 in `prepare_dispatcher'
13 /var/www/oro/production/releases/20100528130253/vendor/rails/railties/lib/initializer.rb 185 in `process'
14 /var/www/oro/production/releases/20100528130253/vendor/rails/railties/lib/initializer.rb 113 in `send'
15 /var/www/oro/production/releases/20100528130253/vendor/rails/railties/lib/initializer.rb 113 in `run'
16 /var/www/oro/production/releases/20100528130253/config/environment.rb 29
17 /usr/local//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
18 /usr/local//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `require'
19 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/railz/application_spawner.rb 303 in `preload_application'
20 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/railz/application_spawner.rb 252 in `initialize_server'
21 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/utils.rb 255 in `report_app_init_status'
22 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/railz/application_spawner.rb 237 in `initialize_server'
23 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server.rb 194 in `start_synchronously'
24 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server.rb 163 in `start'
25 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/railz/application_spawner.rb 213 in `start'
26 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/spawn_manager.rb 262 in `spawn_rails_application'
27 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server_collection.rb 126 in `lookup_or_add'
28 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/spawn_manager.rb 256 in `spawn_rails_application'
29 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server_collection.rb 80 in `synchronize'
30 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
31 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/spawn_manager.rb 255 in `spawn_rails_application'
32 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/spawn_manager.rb 154 in `spawn_application'
33 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/spawn_manager.rb 287 in `handle_spawn_application'
34 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server.rb 352 in `__send__'
35 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server.rb 352 in `main_loop'
36 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/lib/phusion_passenger/abstract_server.rb 196 in `start_synchronously'
37 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.10/bin/passenger-spawn-server 61
For me it turned out, that my memcache daemon did not listen to 127.0.0.1 but to localhost. After removing the -l localhost option from the init file it worked perfectly. (Default is to listen on all devices.)
I had some similar issues with the memcached gem and switched to dali. Development on dali seems more active and it is significantly faster. I followed the directions on the github page and had dali up and running in about ten minutes.
Just making sure, but I don't see where you're setting the session config to your CACHE constant:
config.action_controller.session = {
:session_key => '_appname',
:secret => 'secret',
:cache => CACHE,
:expires => 10
}
This might work for qa/dev/testing since I think by default rails looks for the memcached store on localhost. Whereas on production you seem to have a different ip for the memcached server.
In the stacktrace there's 3 lines:
/var/www/oro/production/releases/20100528130253/config/environment.rb 29
/usr/local//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
/usr/local//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `require'
It seems to be some gem missing, please review the environment.rb on line 29
did you try?:
sudo gem install memcached
It's memcached running?
sudo /etc/init.d/memcached start

Resources