undefined method 'engines' for Rails::Engine::Railties:Class - ruby-on-rails

I have been setting up ruby on rails on my mac - I'm learning (I guess we all are) - I run rails and go to the site where the app is and see the following error.
undefined method 'engines' for Rails::Engine::Railties:Class
The app was running fine until I bundle installed the dependant gems (I think I may have updated them).
How do I read this error so I know what actually is wrong.
If I have to define the method, how do I do that - what with and where?
Thanks in advance,
Dan

Related

Rails 2.3.8 tiny mce issue - undefined method `uses_tiny_mce'

I am facing an issue in my application with tiny mce.
All the gem version & ruby version is OK on my system, but it is giving me error
= undefined method `uses_tiny_mce'
Here i installed the tiny_mce gem. COnfigured it correctely, but still there is an issue.
Please help.
Did you include
config.gem 'tiny_mce'
in config/environment.rb?
I have used this gem in the past too, but have stopped using it. I figured it complicated the setup and deployment of my Rails apps. Since then I have just used the TinyMCE editor by itself. Since it is 100% javascript, it does not touch any Ruby code which keeps things better organized.
I was not using this as a plugin.
I have followed the steps given in the,
http://enginey.googlecode.com/svn/trunk/vendor/plugins/tiny_mce/README.rdoc
Steps :
script/plugin install git://github.com/kete/tiny_mce.git
rake tiny_mce:install
my issue got resolved.

Ruby on Rails Plugin: acts_as_taggable_on_steroids. Keep getting "method_missing" undefined local variable or method 'acts_as_taggble_on'

I am trying to implement a tagging system for my rails app. I employed the popular plugin acts_as_taggable_on_steroids, and followed the instruction on how to install it. I then included acts_as_taggable in the model that I would like to have tags on, but then when I try to start the server I keep getting the error method_missing': undefined local variable or methodacts_as_taggable' for # (NameError)
I look on google and the author suggested to try acts_as_taggable_on, but still this did not fix the problem. I am struggling on this problem for hours already, but still don't know where is the problem. Could anyone please shed some light?
Thank you very much for all the help!!
Did you try to require the lib ruby of act as taggable on steroids at the beginning of your file?
Something like:
require 'acts_as_taggable'
maybe?

Rails 2.3.9, adding ActiveScaffold, getting in `alias_method': undefined method `number_of_pages' for class `Paginator'

I have AS (as a plugin) working in another app just fine (I dont remember this
issue...) - its also using Rails 2.3.9, on same dev box.
Now trying to add it to a new app and getting this error when running
the webrick, script/server:
/Users/kimptoc/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.9/lib/
active_support/core_ext/module/aliasing.rb:33:in `alias_method':
undefined method `number_of_pages' for class `Paginator' (NameError)
from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p302/gems/
activesupport-2.3.9/lib/active_support/core_ext/module/aliasing.rb:
33:in `alias_method_chain'
from /Users/kimptoc/Documents/ruby/borisbikestats/vendor/plugins/
active_scaffold/lib/extensions/paginator_extensions.rb:9
I couldn't find any previous references to this error.
Embarassingly I dont know which version of AS I am using successfully... it says 1.2RC1 in the CHANGELOG file, but I seem to remember trying a few of the forks...(is there somewhere I can see which fork is in use...). I have tried using the the 'main' activescaffold in the new project, but it fails as above, but so does using the same plugin that is in the working project :(
Thanks in advance for any pointers as to what I am doing wrong.
Thanks,
Chris
PS Just realised that new Rails was using Rails 3 and old/working one was 2.3.9. It seems you need to use an alternate branch of AS for Rails 3, like this : https://github.com/vhochstein/active_scaffold/wiki
This is just a guess, but built in pagination was removed in Rails 2 as I recall, and you needed to install the classic_pagination plugin to get that functionality back.
I only used ActiveScaffold once, but the error there says paginator_extensions.rb ... it's probably monkey patching the old Rails paginator? Therefore the class exists but the number_of_pages method doesn't.

Ruby on Rails application could not be started

As you can see at https://ssl.virtualweb.at/redmine/ i try to get Redmine up & running.
At the start i got this error:
undefined method `mattr_accessor' for ActiveSupport::Deprecation:Module
Could someone be so nice an give some tipps how to get it to run?
t.i.a.
Can you give us a little more information? For example - can you go and look at the logs and find the full backtrace of the error that is occurring?
Otherwise we don't know where the error is occurring. Then we can narrow it down a bit better
My best guess atm, though, is that you have the wrong version of ruby or rails or rake (or something similarly important). mattr_acessor is a fundamental method in ruby - so I'd start by reading the redmine docs to see what version of ruby you need.
Then go check if you've got that version installed... repeat with rails, required gems etc.

Cucumber/Selenium newbie trying to use RoR session-data in step-definitions ... and failing

I'm spending my first few days with cucumber/selenium trying to figure out whether RBB is the thing I want to use in my latest RoR project.
My setting: Rails 2.3.5, selenium-client 1.2.17, cucumber 0.4.4 etc, quite current in my view.
Following the instructions on https://github.com/cucumber/cucumber/wiki/Setting-up-Selenium I got cucumber/selenium sorts of up and running. Simple step-definitions do work and do produce outpout that makes sense (I dont usually expect more on my first few days with anything :-) ).
My problem: I am trying to access the rails session-hash in my step-definition...and failing miserably. Refering to "session" in any "given"-clause just presents me with "undefined method `session' for nil:NilClass (NoMethodError)"
Is there any secret handshake I am missing in the docs???? Anything that has to be configured my my environment so using the session-hash is possible?
Regards
Michael
This should happen right out of the box. If you add a debugger line right to a step definition you should be able to type "session" and see something like:
{:session_id=>"f978d4220252b7e1ca51fb7319d5a365", "flash"=>{}}

Resources