I've tried calling both logger.debug and Rails.logger.debug but nothing is getting outputted to the development.log file. Any ideas as to what's going?
Update
I should also note that I'm calling this from a controller and that other information such as the SQL queries are getting outputted to the log file.
Source Code
https://github.com/kyledecot/skateparks-web
Gemfile
source 'http://rubygems.org/'
gem 'rails', '3.0.7'
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'omniauth'
gem 'flash_cookie_session'
gem 'carrierwave'
gem 'mini_magick'
gem 'barometer'
gem 'gdata_19', :require => 'gdata'
gem 'google_places'
gem 'fleakr'
gem 'resque'
gem 'nokogiri'
gem 'decent_exposure'
gem 'cancan'
gem 'friendly_id'
gem 'breadcrumbs_on_rails'
gem 'defensio'
gem 'twitter'
gem 'thinking-sphinx', :require => 'thinking_sphinx'
gem 'ts-resque-delta', '1.0.0', :require => 'thinking_sphinx/deltas/resque_delta'
gem 'mime-types', :require => 'mime/types'
gem 'vpim'
gem 'will_paginate', '~> 3.0.pre2'
gem 'acts_as_geocodable'
gem 'acts_as_audited', '2.0.0.rc7'
gem 'passenger'
gem 'paper_trail'
gem 'thin'
gem 'compass', '>= 0.11.1'
gem 'guard-compass'
gem 'redcarpet'
gem 'mysql2', '0.2.7'
gem 'placemaker'
group :development, :test do
gem 'sqlite3'
gem 'capybara'
gem 'launchy'
gem "rspec-rails"
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
gem 'guard-rspec'
gem 'guard-bundler'
gem 'guard-delayed'
gem 'factory_girl'
gem 'rspec'
end
group :production do
end
enviornment.rb
require File.expand_path('../application', __FILE__)
Skateparks::Application.initialize!
ActiveRecord::Base.logger.level = Logger::INFO
ImagesController
def server
logger.warn "WARN!" # nothing
logger.info "INFO!" # nothing
logger.debug "DEBUG!" # nothing
puts Rails.logger.inspect # shows
puts "PUTS!" # shows
end
Log Output w/ rails s
#<ActiveSupport::BufferedLogger:0x000001058867a0 #level=0, #buffer={}, #auto_flushing=1, #guard=#<Mutex:0x000001058866b0>, #log=#<File:/Users/Kyle/Desktop/skateparks-web/log/development.log>>
PUTS!
Started GET "/images/fd3b38315c30532b3a55bb84d35e5925/34_m.png" for 127.0.0.1 at 2011-06-29 03:41:50 -0400
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
UPDATE:
Viget Labs has removed the loggable gem from their repo (
https://github.com/vigetlabs/loggable
)
Some gem in your app is using the vigetlabs/loggable gem.
Looking at Gemfile.lock, it appears that the "fleakr" gem is using it.
I noted that while logger.info "hello" does not work, Rails.logger.info "hello" works just fine.
It appears the loggable gem is somehow redefining the logger methods to do nothing using the LoggerStub:
class LoggerStub
[:debug, :error, :fatal, :info, :warn].each do |method|
class_eval <<-CODE
def #{method}(message); nil; end
CODE
end
end
What is happening is that the loggable gem is defining a class variable and instance variable called logger, and the .info etc methods are being called on one of them. And those methods simply return nil.
I know this is a partial answer (in that it is not a complete solution), but that should be
good information to get you started on finding the proper solution.
Take a look also at these files:
log_methods.rb
logger_stub.rb
UPDATE
Adding..
class ActionController::Base
self.class.logger = Rails.logger
end
..should forcibly override loggable's assignment of the logger and things should work normally. I suppose the same would work for class ActiveRecord::Base.
But of course, this is a brute force solution that does not fix the underlying problem. For a real "fix" you would need to delve further into fleakr or loggable and maybe ask about this problem at the issues page for those gems.
UPDATE
See if you can make the fleakr gem use the loggable fork from mediashelf : that fork should use the default Rails logger if it is available.
If you're calling :GET "/images/92131721fcf3b8beb12b6e55014b9976/41_m.png"
...isn't that going to be going to the :show action in the images controller, rather than the :index?
(of course, I can't know for sure without knowing your routes file...)
Related
I've got a weird situation and I'm not sure how to even start debugging it. Would love any advice or direction that someone can provide.
I've got 64 rspec tests - view, model, controller, feature - and they all pass just fine. As soon as I simply add gem 'wicked_pdf' to the Gemfile, do bundle install, and then re-run the tests, all 16 of the view specs fail, but all other tests run fine. Not only that, the entire app runs fine, local and on Heroku. So it's only rspec that is having the issue; perhaps something in wicked_pdf is conflicting with rspec...?
I don't think the issue is in my code per se, but I'll add whatever I can think of on the off chance it contains a clue. One of the 16 now-failing view specs is:
describe "properties/show.html.erb" do
it "displays a field's name and value" do
assign(:property,
FactoryGirl.build_stubbed(:property, stories: 2))
render
expect(rendered).to match(/Stories.*2/m)
end
... rest ommitted
One of the error messages is (they are all the same):
1) properties/show.html.erb displays a field's name and value
Failure/Error: <%= ps_markup_field_or_hide("Year Built", #property.yearbuilt, false,
ActionView::Template::Error:
undefined method `ps_markup_field_or_hide' for #<#<Class:0x007f2b1123e0e0>:0x0000000968d978>
# ./app/views/properties/_show_body_post.html.erb:6:in `_app_views_properties__show_body_post_html_erb__2822263843794330255_69911472833980'
# ./app/views/properties/show.html.erb:19:in `_app_views_properties_show_html_erb__3990796008770089996_79086380'
# ./spec/views/properties/show.html.erb_spec.rb:19:in `block (2 levels) in <top (required)>'
# /usr/local/rvm/gems/ruby-2.3.0/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
# -e:1:in `<main>'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `ps_markup_field_or_hide' for #<#<Class:0x007f2b1123e0e0>:0x0000000968d978>
# ./app/views/properties/_show_body_post.html.erb:6:in `_app_views_properties__show_body_post_html_erb__2822263843794330255_69911472833980'
The view that contains the red-herring "undefined method" contains many calls like this to the ps_markup_field_or_hide helper function:
<%= ps_markup_field_or_hide("Year Built", #property.yearbuilt, false,
#property.yearbuiltflag, "A",
" (actual)", " (estimated)") %>
That function is defined in app/helpers/views/properties/show_helper.rb:
module Views::Properties::ShowHelper
def ps_markup_field_or_hide(name, value, hide=false,
ext_field=nil, ext_conf_val=nil,
ext_true_str=nil, ext_false_str=nil
)
title = "<div class='hanging-indent'> " +
"<span class='ps-details-titles'> #{name}: </span>"
conf_str = ""
if (ext_conf_val != nil)
conf_str = ext_false_str
if (ext_field != nil && ext_field.upcase == ext_conf_val.upcase)
conf_str = ext_true_str
end
end
if (value != nil)
(" " + title + value + conf_str + "\n </div>").html_safe
else
(" " + title + "Not on File\n </div>").html_safe unless hide
end
end
end #module Views::Properties::ShowHelper
I started hacking, trying to kludge a workaround, so I blindly (I'm a ruby beginner) added an include Views::Properties::ShowHelper statement to the controller; then I tried hard-coding the fully qualified path to the method in the view: Views::Properties::ShowHelper.ps_markup_field_or_hide. I even assigned the ps_markup_field_or_hide() method to a view variable in the controller and tried to call the function from within the view that way. Nothing worked - same error each time - and my attempts were getting so kludgey that even I became disgusted and backed away.
My Gemfile:
source 'https://rubygems.org'
gem 'rails', '5.0.0.1'
gem 'responders', '2.3.0'
gem 'puma', '3.4.0'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.4.1'
gem 'redcarpet', '~> 3.0.0'
gem 'normalize-scss', '~> 4.0', '>= 4.0.3'
gem 'activemodel-serializers-xml'
gem 'draper', github: 'drapergem/draper'
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'
gem 'fuzzy-string-match'
group :development, :test do
gem 'byebug', '9.0.0', platform: :mri
gem 'spring-commands-rspec'
gem 'rspec-rails', '~> 3.5'
gem 'guard-rspec'
gem 'capybara', '~> 2.5'
gem 'selenium-webdriver'
gem 'factory_girl_rails', '~> 4.5.0'
gem 'database_cleaner', '1.3.0'
end
group :development, :test, :production do
gem 'mysql2', '>= 0.3.18', '< 0.5'
end
group :development do
gem 'web-console', '3.1.1'
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
gem 'pry-byebug'
end
group :test do
gem 'sqlite3'
gem 'rails-controller-testing', '0.1.1'
gem 'minitest-reporters', '1.1.9'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
group :production do
# gem 'pg', '0.18.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I'm developing using the Cloud9 IDE.
What else might be helpful... here's the config/initializers/wicked_pdf.rb:
# WickedPDF Global Configuration
# https://github.com/mileszs/wicked_pdf/blob/master/README.md
if Rails.env.production?
wkhtmltopdf_path = "#{Rails.root}/bin/wkhtmltopdf-binary-0.12.3.1/bin/wkhtmltopdf"
WickedPdf.config = { exe_path: wkhtmltopdf_path, wkhtmltopdf: wkhtmltopdf_path }
else
WickedPdf.config = {
}
end
I was looking at https://github.com/rspec/rspec-rails/issues/1644, where adding the rails-controller-testing gem caused rspec to fail with a NoMethodError, but I couldn't see how to apply any of the suggestions on that post to this situation. I tried modifying the Gemfile adding the "require: false" (gem 'wicked_pdf', require: false), re-running bundle install, and placing the require 'wicked_pdf' in several other places, but that only caused other errors and I felt like I was poking around in the dark and not in the right direction.
All in all, I'm stumped as to how to proceed, and if anyone has any ideas, or could suggest the next debugging step, I'd truly appreciate it.
Thank you so much -- Derek.
PS. I run my tests on cloud9 using: xvfb-run bundle exec spring rspec spec --format doc, and I am using an external mysql database. I also have the ability to run my tests locally on sqlite, which I usually do for speed because the external service is so slow, but I've tried the tests both using mysql and sqlite and I get the same error messages either way.
PPS. My current workaround is I comment out the wicked_pdf gem and the wicked_pdf.rb file, re-run bundle install and run all the tests, then when I get around to writing the PDF specs, I'll "turn back on" the wicked_pdf stuff and just run the PDF specs separately. But that's such a mess, and I'd like to have the tests all running clean in one fell swoop so I can get a CI workflow going (on the todo list).
$ bundle show rails
/usr/local/rvm/gems/ruby-2.3.0/gems/rails-5.0.0.1
$ bundle show wicked_pdf
/usr/local/rvm/gems/ruby-2.3.0/gems/wicked_pdf-1.1.0
$ bundle show rspec-rails
/usr/local/rvm/gems/ruby-2.3.0/gems/rspec-rails-3.5.2
I'm trying to install fat free crm with ruby on rails on Windows 7, but when I put the command
rake db:create RAILS_ENV=production
it says
rake aborted!
LoadError: cannot load such -- 2.1/pg_ext
Normally, it would say what gem I should install, but not in this case.
How can I solve this error?
Edit:
A friend of mine suggested to uncomment mysql2 and comment pg on the Gemfile file in the proyect like this:
gem 'mysql2'
#gem 'sqlite3'
#gem 'pg'
But now I get this:
Unable to load the EventMachine C extension; To use the pure-ruby reactor, requi
re 'em/pure_ruby'
C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': ca
nnot load such file -- 2.1/rubyeventmachine (LoadError)
Have any ideas of why this happends?
Here is my Gemfile:
source 'https://rubygems.org'
# Uncomment the database that you have configured in config/database.yml
# ----------------------------------------------------------------------
gem 'mysql2'
# gem 'sqlite3'
# gem 'pg'
# Removes a gem dependency
def remove(name)
#dependencies.reject! {|d| d.name == name }
end
# Replaces an existing gem dependency (e.g. from gemspec) with an alternate source.
def gem(name, *args)
remove(name)
super
end
# Bundler no longer treats runtime dependencies as base dependencies.
# The following code restores this behaviour.
# (See https://github.com/carlhuda/bundler/issues/1041)
spec = Bundler.load_gemspec( File.expand_path("../fat_free_crm.gemspec", __FILE__) )
spec.runtime_dependencies.each do |dep|
gem dep.name, *(dep.requirement.as_list)
end
# Remove premailer auto-require
gem 'premailer', :require => false
# Remove fat_free_crm dependency, to stop it from being auto-required too early.
remove 'fat_free_crm'
group :development do
# don't load these gems in travis
unless ENV["CI"]
gem 'thin'
gem 'quiet_assets'
gem 'capistrano'
gem 'capistrano-bundler'
gem 'capistrano-rails'
gem 'capistrano-rvm'
#~ gem 'capistrano-chruby'
#~ gem 'capistrano-rbenv'
gem 'guard'
gem 'guard-rspec'
gem 'guard-rails'
gem 'rb-inotify', :require => false
gem 'rb-fsevent', :require => false
gem 'rb-fchange', :require => false
end
end
group :development, :test do
gem 'rspec-rails', '~> 2'
gem 'headless'
gem 'debugger', :platforms => 'mri_19' unless ENV["CI"]
gem 'byebug', :platforms => ['mri_20', 'mri_21'] unless ENV["CI"]
gem 'pry-rails' unless ENV["CI"]
end
group :test do
gem 'capybara'
gem 'selenium-webdriver'
gem 'database_cleaner'
gem "acts_as_fu"
gem 'factory_girl_rails'
gem 'zeus' unless ENV["CI"]
gem 'coveralls', :require => false
gem 'timecop'
end
group :heroku do
gem 'unicorn', :platform => :ruby
gem 'rails_12factor'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'execjs'
gem 'therubyracer', :platform => :ruby unless ENV["CI"]
end
gem 'turbo-sprockets-rails3'
It sounds like you are missing the pg gem from your Gemfile. Is it in the development group?
Can you post your Gemfile?
Uncomment #gem pg.
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby' is a separate error. Where did you get that Gemfile?
I have been having this pretty rough time with assets on production. It came down to me trying to override the sprokets helper module to try and see what was up... When I re-wrote it to the following:
module Sprockets
module Rails
module Helper
def compute_asset_path(path, options = {})
It would not run. I tried it in my local environment, and it runs perfectly. Is there a reason the production environment would not allow my assets to render in digest form, but my local environment would? This is related to what this gent was asking...
Rails 4.0.3 generating incorrect asset paths with asset_sync
Here is the error I receive after trying to override that method (which doesn't have an error when running with RAILS_ENV=development):
ActionView::Template::Error (undefined local variable or method `digest_path' for #<#<Class:0x000001034a99e0>:0x000001034a81d0>):
Asset Gems in Gemfile for reference:
source 'http://rubygems.org'
# ruby '2.1.1'
gem 'rails', '4.0.4'
gem 'jbuilder', '~> 1.2'
gem 'devise'
gem 'devise_invitable'
gem 'figaro'
gem 'mysql2'
gem 'simple_form'
gem 'kaminari'
gem 'statistics'
gem 'possessive'
gem 'geocoder'
gem 'nokogiri'
gem 'asset_sync'
gem 'sprockets-rails', :require => 'sprockets/railtie'
gem 'ledermann-rails-settings', :require => 'rails-settings'
gem 'public_activity'
group :assets do
gem 'therubyracer'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
end
group :development do
gem 'better_errors'
gem 'binding_of_caller', :platforms=>[:mri_19, :mri_20, :rbx]
gem 'guard-bundler'
gem 'guard-rails'
gem 'quiet_assets'
gem 'rails_layout'
gem 'rb-fchange', :require=>false
gem 'rb-fsevent', :require=>false
gem 'rb-inotify', :require=>false
end
group :test do
gem 'email_spec', '>= 1.4.0'
gem 'launchy', '>= 2.2.0'
gem 'capybara', '>= 2.0.3'
gem 'database_cleaner', '>= 1.0.0.RC1'
gem 'cucumber-rails', '>= 1.3.1', :require => false
end
group :production do
gem 'rails_12factor'
end
gem 'rspec-rails', '>= 2.12.2', :group => [:development, :test]
gem 'factory_girl_rails', '>= 4.2.0', :group => [:development, :test]
gem 'teaspoon', '>= 0.7.4', :group => [:development, :test]
gem 'cancan', '>= 1.6.9'
gem 'rolify', '>= 3.2.0'
gem 'stripe-rails'
gem 'faker'
gem 'open4'
gem 'unf'
When I run this in development mode, it runs completely fine. When I run this through production mode (even with the same config file) it does not inherit the View properties like digest_path or asset_digest_path is null or manifest, etc.
module Sprockets
module Rails
module Helper
def compute_asset_path(path, options = {})
if digest_path = asset_digest_path(path)
path = digest_path if true # BUG: digest assets doesn't work on live, let's just bake it
path += "?body=1" if options[:debug]
File.join(assets_prefix || "/", path)
else
super
end
end
def asset_digest_path(path, options = {})
if manifest = assets_manifest
if digest_path = manifest.assets[path]
return digest_path
end
end
if environment = assets_environment
if asset = environment[path]
return asset.digest_path
end
end
end
end
end
end
module ActionView
module Helpers
module AssetUrlHelper
def compute_asset_path(source, options = {})
dir = ASSET_PUBLIC_DIRECTORIES[options[:type]] || ""
File.join(dir, source)
end
end
end
end
Hopefully this will help save my fellow programmer friends some head banging :D
I was uploading the files to S3, I didn't realize that the manifest wasn't loaded by Rails. You can have all your production settings right (like above and in other threads), but if you don't have the manifest.json file readable by Rails, it will still generate /javascript/* (example) urls.
I was still having trouble with multi_json gem's latest version, so I downgraded it to 1.7.8 and it works fine.
gem 'multi_json', '1.7.8'
That's so it can read the manifest.json file which rake assets:precompile creates.
There is a debate on this sprockets thread https://github.com/rails/sprockets-rails/issues/107 on whether your manifest file should be in git or just on a deploy script, do what suits you best, just make sure it is findable in:
/public/assets/manifest.json
or specifiy it yourself with
config.assets.manifest = '...'
That may or may not be depricated.
Cheers!
I upgraded to rails4 from 3.2.2 and i now get this undefined method from my rabl template that id didn't get before the upgrade.
the "tooth" paramater on procedures is a set by a getter/setter method that is stored in the postgres database as a hstore hash named properties.
Not sure what has changed in rails4 to make this happen!
Any help would be much appreciated.
ERROR:
Showing /home/action/app/views/procedures/chart.json.rabl where line #1 raised:
undefined method `scan' for {"tooth"=>""}:Hash
Extracted source (around line #1):
1 object #procedures
2 attributes :buccal, :mesial, :occlusal, :distal, :lingual
Trace of template inclusion: app/views/procedures/_procedures_table.html.erb, app/views/procedures/chart.html.erb
Procedures model (getter and setter method for :tooth)
%w[tooth buccal mesial occlusal distal lingual].each do |key|
attr_accessible key
scope "has_#{key}", lambda { |value| where("properties #> (? => ?)", key, value) }
define_method(key) do
properties && properties[key]
end
define_method("#{key}=") do |value|
self.properties = (properties || {}).merge(key => value)
end
end
Gemfile:
source 'http://rubygems.org'
gem 'rails', '4.0.0.rc2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem "paperclip", "~> 3.0"
gem 'rabl'
gem 'activerecord-postgres-hstore'
gem "bugsnag"
gem 'country_select'
gem 'bullet', group: :development
# Asset template engines
gem 'sass-rails', '~> 4.0.0.rc1'
gem 'coffee-rails', '~> 4.0.0.rc1'
gem 'uglifier', '>= 1.3.0'
gem 'twitter-bootstrap-rails'
gem 'therubyracer', :platform => :ruby
gem 'less-rails'
gem 'jquery-ui-rails'
gem 'jquery-rails'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
# Declarative Authorization
gem 'declarative_authorization'
gem 'protected_attributes'
# Authlogic
gem 'authlogic'
gem 'simple_form', '3.0.0.rc'
group :production do
end
group :test do
# Pretty printed test output
gem 'turn', :require => false
end
gem 'rubber'
gem 'open4'
gem 'gelf'
gem 'graylog2_exceptions', :git => 'git://github.com/wr0ngway/graylog2_exceptions.git'
gem 'graylog2-resque'
Found the answer!! Rails 4 now has native support for Hstore, which is awesome but I hadn't realised. To fix my problem i merely followed this guide below which is great to set up my model with hstore and then deleted my getter/setter methods. http://blog.remarkablelabs.com/2012/12/a-love-affair-with-postgresql-rails-4-countdown-to-2013
I've built a model called "Subject" in my Rails 3.2 application. I used the scaffold command below.
rails g scaffold Subject subject singular:boolean gender:integer subject_masculine subject_feminine subject_neuter language:references --skip-stylesheets
The scaffold runs almost to the end, but then gives a mysterious error about the helper:
The name 'SubjectsHelper' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.
I've tried reversing the scaffold and rebuilding. In the end I just built the table and it seems to be working ok. There is no helpers/subjects_helper.rb file, but I don't expect to need a helper for this particular model.
I could not find subject among any reserved word list, but that in itself was a problem. Another SO post has been raised on this issue.
List of reserved words in rails *3*
Why am I getting this error, and can I just ignore it?
EDIT
My Gemfile as requested
source 'https://rubygems.org'
gem 'rails', '3.2.8'
gem 'thin'
gem 'sinatra'
gem 'pg'
gem 'simple_form'
gem "nested_form"
gem 'thinking-sphinx'
gem 'devise'
gem 'haml-rails'
gem 'ruby_parser'
gem 'html2haml'
gem 'best_in_place'
gem 'carrierwave'
gem 'fog'
gem 'seed_dump'
gem 'bluecloth'
gem 'redcarpet'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'prototype-rails'
gem 'uglifier', '>= 1.0.3'
gem 'twitter-bootstrap-rails'
gem 'therubyracer'
gem 'less-rails'
gem 'jquery-datatables-rails'
end
gem 'jquery-rails'
gem 'social_stream'
gem 'rails-footnotes', '>= 3.7.5.rc4', :group => :development
group :development do
gem 'rails-erd'
gem 'quiet_assets'
end
gem 'vestal_versions', :git => "git://github.com/futurechimp/vestal_versions.git"
gem 'diffy'
gem 'diffrent'
EDIT2
As per Philip's suggestion, I ran the Module.constants command from the Rails console. Amongst the output, there were two 'subject' values:
:SubjectsHelper
:Subject
I check several times there is no helper, so I decided to add one. I created the helpers/subjects_helper.rb file, with the following code:
module SubjectsHelper
end
Rails has now rebooted OK. I still don't understand what happened though.
As you correctly say, SubjectsHelper is already provided by Social Stream. See:
https://github.com/ging/social_stream/blob/master/base/app/helpers/subjects_helper.rb
Your solution is working because you are reopening the module, which is a valid action in Ruby.
I found it. I am using the Social Stream gem, which has a subject in the routes.
subject_lrdd /subjects/lrdd/:id(.:format)
It must be buried in the engine somewhere.