Note that there are some explanatory texts on larger screens.

plurals
  1. PORedis on Ruby On Rails - uninitialized constant
    primarykey
    data
    text
    <p>I'm using passenger on Ubuntu Server with Apache installed.</p> <p>When I try to load the ruby application with redis on it I get this error.</p> <pre><code>Error message: uninitialized constant Redis::Client::ALIASES Exception class: NameError Application root: /xxx/ruby 0 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/redis-namespace-0.4.3/lib/redis/namespace.rb 128 in `' 1 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/redis-namespace-0.4.3/lib/redis/namespace.rb 4 in `' 2 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/redis-namespace-0.4.3/lib/redis/namespace.rb 3 in `' 3 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/resque-1.8.2/lib/resque.rb 1 in `' 4 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/resque-1.8.2/lib/resque/server.rb 3 in `' 5 /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 68 in `require' 6 /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 68 in `block (2 levels) in require' 7 /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 66 in `each' 8 /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 66 in `block in require' 9 /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 55 in `each' 10 /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 55 in `require' 11 /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb 119 in `require' 12 /xxx/ruby/config/application.rb 7 in `' 13 /xxx/ruby/config/environment.rb 4 in `require' 14 /xxx/ruby/config/environment.rb 4 in `' 15 config.ru 3 in `require' 16 config.ru 3 in `block in ' 17 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb 51 in `instance_eval' 18 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb 51 in `initialize' 19 config.ru 1 in `new' 20 config.ru 1 in `'/usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 225 in `eval' 21 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 225 in `load_rack_app' 22 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 157 in `block in initialize_server' 23 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb 572 in `report_app_init_status' 24 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 154 in `initialize_server' 25 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously' 26 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 180 in `start' 27 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 129 in `start' 28 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application' 29 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add' 30 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application' 31 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize' 32 &lt; td=""&gt; &lt;&gt; prelude&gt; 10:in `synchronize' 33 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize' 34 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application' 35 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application' 36 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application' 37 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop' 38 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously' 39 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/helper-scripts/passenger-spawn-server 99 in `' </code></pre> <p>This is how my config.ru looks like.</p> <pre><code># This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Rack::URLMap.new \ "/" =&gt; xxx::Application, "/resque" =&gt; Resque::Server.new </code></pre> <p>This is how my resque_r.rb looks like (its located in config/initializers).</p> <pre><code>require "rubygems" require 'resque_scheduler' Resque.redis = 'localhost:6379' Resque.redis.namespace = "resque:SchedulerExample" # If you want to be able to dynamically change the schedule, # uncomment this line. A dynamic schedule can be updated via the # Resque::Scheduler.set_schedule (and remove_schedule) methods. # When dynamic is set to true, the scheduler process looks for # schedule changes and applies them on the fly. # Note: This feature is only available in &gt;=2.0.0. Resque::Scheduler.dynamic = true Dir["#{Rails.root}/app/workers/*.rb"].each { |file| require file } # The schedule doesn't need to be stored in a YAML, it just needs to # be a hash. YAML is usually the easiest. Resque.schedule = YAML.load_file(Rails.root.join('config', 'resque_schedule.yml')) </code></pre> <p>My Gem file</p> <pre><code>source 'https://rubygems.org' gem 'rails', '3.2.3' # Bundle edge Rails instead: # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git' gem 'sqlite3' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', :require =&gt; 'sass' gem 'coffee-rails', '~&gt; 3.2.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platform =&gt; :ruby gem 'uglifier', '&gt;= 1.0.3' gem 'compass-rails' end gem 'twitter-bootstrap-rails', "~&gt; 2.0rc0" gem 'jquery-rails' gem 'feedzirra' gem "friendly_id", "~&gt; 4.0.1" gem 'acts-as-taggable-on', '~&gt; 2.2.2' gem 'will_paginate', '~&gt; 3.0' gem 'gon' gem 'wikitext' gem 'twitter' gem 'yaml_db' #JSON PARSER gem "oj", "~&gt; 1.2.8" gem "mysql2", "~&gt; 0.3.11" gem 'resque', :require =&gt; "resque/server" gem 'resque-scheduler', :require =&gt; 'resque_scheduler' # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~&gt; 3.0.0' # To use Jbuilder templates for JSON # gem 'jbuilder' # Use unicorn as the app server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger # gem 'ruby-debug19', :require =&gt; 'ruby-debug' </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload