I found a weird bug in Rails 3.0.? that I want to report to the Rails team, but I have no idea how to do it.
Does anyone here know how to do this? Where is the open source project hosted? Do they have have ticket system?
Actually, I am going to share the issue I found, maybe it really isn't a bug. I am using Rails 3.0.7 and Ruby 1.8.7.
I created some static pages and I have two pages that are named very similar one named "holiday" and the other named "holidays". First, I created the singular "holiday" page and everything worked as it should. Then I created the plural version of it and when I tried to test it didn't work, I kept getting redirected to the not found or 404. Just to be clear, yes I restarted the server but that didn't fix the problem. The only way this weird issue went away in when I cleared the browser cache.
Here are the code snippets.
In the routes I added this:
match '/holiday' => 'pages#holiday' , :as => 'holiday'
match '/holidays' => 'pages#holidays' , :as => 'holidays'
in the controller I just added empty actions
def holiday(); end
def holidays(); end
somewhere in the views folder I have the corresponding pages "holiday.html.erb" and "holidays.html.erb".
When I visit the first page (/holiday) it works. The page gets served.
When I visit the second page (/hoidays) it doesn't work. I get redirected to the not found / 404 page.
Has anyone encountered this weird issue in Rails 3?
Here's the bugs/issues system:
https://github.com/rails/rails/issues
You can search for the bug before submitting it. Maybe someone already reported it.
Related
I make debug on a website running on cakephp 2 (yes it's old i know)
I have strange errors i cannot resolve.
in log i have:
-Error: [MissingControllerException] Controller class Wp-login.phpController could not be found
-Error: [MissingControllerException] Controller ColonisersController could not be found.
-Error: [MissingActionException] Action ImgController::ui-bg_diagonals-thick_90_eeeeee_40x40.png() could not be found.
-Error: [MissingActionException] Action ImgController::moustique-tigre-default.png() could not be found.
...
I search over all the source code for Colonisers but it is not write even once (also i think ColonisersController is a renammed controller because it is misspelled).
I search over the web for the Wp-login.php and it is a wordpress page, so no link to cakephp at all, also not write anywhere in the source code.
Same story for the missings pngs files. not in the source code.
I try to clear the cache folder on server but problems remains.
I have ghost source code? file are somewhere in another cache ?
any idea are welcomed.
By default all request that do not map to an actual file are being passed over to CakePHP, where the app will try to match the request to a route, and if one is found, finally try to match it to a controller and an action.
You seem to have some rather unspecific routes defined that eat pretty much anything as a possible controller name, hence things are being passed further for searching for a matching a controller and an action, which is where the request flow will end, as no matching controller or action can be found - consequently a MissingControllerException or MissingActionException is being triggered, an error is being logged (by default all exceptions are being logged), and in production mode (debug = 0) the app will respond with a 404 error.
So, no ghosts, no cached files, that's just how things work.
I am trying to use paperclip 3.5.1 with devise 3.1.0 in a Rails 4 application.
I wanted to be able to add an avatar for my User devise model, so I generated the required fields but I have problem in the showing and saving the picture.
I tried the solution given here but when I try to load a url now I get for every controller that I have the following error. It even appears for the RegistrationController.
undefined method `devise_controllers?' for #<__Some__Controller:_____>
Why does this happen and how can I solve it? I couldn't find any solutions online and since it is my first rails application I'm not so familiar with it yet.
This is just a typo: the name of the helper is :devise_controller?, notice the extra "s" you have there: rubydoc reference
I have one page checkout. My OPC works fine with other browsers but I get a fatal error with IE. IE's Javascript console says Object doesn't support this property or method.. The method in question is var items = field_name.split(reg) from the file: order-address.tpl.
I have no idea what is causing the problem. Because of this error, I cannot login properly from one page checkout when using IE. It seems that there are a lot of people with the same problem. What's the issue?
This error is present in 1.4.9, 1.4.10, and 1.5.3.
SOLVED. It turns out the issue is not with coding but with settings of IE.
All I had to do was reset IE from Tools => internet options => advanced => reset (including personal settings)
That did it for me. Thank you altafhussain for trying to help me out.
I found a tutorial here https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restful_authentication-to-Devise-, however it seems like it is missing pieces of what to do, for example the restful_authentication plugin is still there...how do I remove it? Then how does Devise know what to get for my App...I've tried it but it just keeps breaking my App.
Erase everything in the user.rb controller (or your controller)
Make Sure all of Restful_Authenication is gone (there is quite a bit of includes that may be presnet)
Make sure devise_for :users is present in the routes.rb file
Look for method errors and replace them back in the User.rb controller.
Think that fixed it.
It gives me the creeps,i'm done, i need some help here, i reverted multiple times back but i can't find the error.
Simple controller (customers),a simple form for adding a customer via :remote => true and the controller does respond_to do |format| { format.js } . Works fine, renders my create.js.rjs template.
I work for a few hours without making any javascript changes or changes to my controllers or authorization etc.. and when i try it again it's not working anymore.
What i mean with not working: Controller gets called, record saved, all partials rendered. But no javascript evaluated, not even a simple alert(1) at the beginning of the file.
I tried with different prototype.js versions and different rails.js versions, but nothing helped. I hope someone has a clue about this or already experienced this.
It's not that i don't want to post code. But it won't help. Its basic code that works and, after some changes where i don't know what i really changed (some locales here, some css there, html templates from a completely different controller a bit..)..
Currently developing with: ruby 1.9.2, rails 3.0.3, prototype 1.7 RC3, rails.js from github.
SOLVED
How stupid, I missed the part where the template naming changed. My application templace was named "application.rhtml". It worked until now. As it stopped to work, I changed it to "application.html.erb" and now it's working.