Just installed Rails 3.1 rc5 and ActiveAdmin from rails-3-1 branch.
Installation went good, and I see the login form. However when I login with provided username/password I'm getting the following error:
ActionView::Template::Error (undefined local variable or method `params'
for #<ActiveAdmin::Views::Pages::Dashboard:0x00000001a59b00>):
1: render view_factory.dashboard_page
Any tips on this one?
Thanks in advance!
The rails-3-1 branch has been merged in to master includes a bunch more bug fixes. Can you please use master instead of rails-3-1 and see if that works?
I will work on adding Rails 3.1.rc5 to the test suite to ensure that everything is working as expected.
EDIT: I just pushed a fix to github (7cd0bcc2e953969541c22c2fe5842995f4fbb80d) that fixes this "params" issue. Should work using Github master branch now.
Related
Not sure if I could reliably reproduce this, but sometimes when I switch branches in development all requests start throwing an undefined method error inside of a helper. The method is present on both branches. I am using global helpers (helper :all).
To fix the issue, I go into the helper file and save any change. Usually I just add a new line to the end of it. After saving, it works fine. Seems like a caching issue.
Has anyone else seen this and resolved it? I am on Rails 4.2.1. As far as I know this only happens in development mode.
Since you are using Rails 4.2, spring has probably cached the code from the old branch. After switching to the new branch remember to run:
spring stop
Spring will restart itself the next time you run the server, tests, or other Rails commands.
problem like this:
undefined method `error_messages_for' for #<#:0x3a4f700>
My English is very rubbish, who can help me solve the problem? thanks
Error messages for was removed in rails 3. It was extracted to a plugin,
don't remember exactly what the plugin was called but it's in the rails
GitHub repo. Rails has changed massively since 1.0.
Check this Error messages for replacement.
I am getting an error on a view when I move my app to Heroku that I am not getting in development or locally in production mode.
I started with the Devise Mongoid app from railsapp.github.com and added bootstrap.
When I deploy to Heroku I get the following error on the Devise navigation parcial,
ActionView::Template::Error (can't convert Array into String):
Im using Mongoid 3.0.0.rc
I think it's related to Mongoid because I was able to get it work originally with 2.4.10 but now I get other errors with that version.
Also, If I comment out the lines in the parcial where it errors, it loads the root okay but eventually crashes out if I navigate around.
I'm running out of ideas!
I can post logs or configuration files if that would help.
Its known and being worked on.
https://github.com/mongoid/moped/issues/21
Advice downgrading back to what you were using for. 3.0.0.rc is also giving me some heroku issues
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.
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"=>{}}