Ruby on Rails Template::Error Heroku logs - ruby-on-rails-3

I get this error when I run heroku logs:
ActionView::Template::Error (Missing partial Partial/menu with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder]}. Searched in:* "/app/app/views"
<%= render "Partial/menu"%>
_menu.html.erb is in views/partial
Everything works fine on localhost and the partial is there. What is the problem?

Related

Error Compiling Assets Rails 3.2.13

When I go to my rails app in my browser I am getting the following error:
Error Compiling CSS Assets
ArgumentError: no time information in "2013-09-20T10:02:37-05:00"
I have been able to work around this error by clearing the cache and cleaning my assets and restarting Apache. However, I cannot do this anymore.
This is not my first Rails project, but this is the first time I have run into this error, and I cannot figure out how to get around this. I should also add that I have been developing the app for a week now, without this error. I have made no changes to my any of my assets.
I figured I'd add the error message from my logfile.
Completed 500 Internal Server Error in 15066ms
ActionView::Template::Error (no time information in "2013-09-25T12:55:42-05:00"):
2: <html>
3: <head>
4: <title>JournalReview</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___63165616209989497_70158248592280'
Rendered vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.3ms)
Rendered vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.0ms)
Rendered vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (9.6ms)
Thanks.
I solved this problem. I had overridden the "!" operator to appear as the factorial notation used in math. I had tested this, because I had expected this to interfere with the false logic, I did not expect this to through an error in Time / Date.
Anyway, I removed that operator, from my module, and everything worked.

Rails Missing Template On Production Server

Before I start, I'd like to stress that I've looked for answers and I've tried to solve the issues by myself.
I have 2 types of controllers -
A controller with a set of methods that render JSON - works perfectly
A controller that actually renders HTML
This code is working perfectly on my local machine and the problem that I have with the second controller is on my production machine.
I've added 755 permissions to all my files but my file owner is the only user on my server which is "root". I've added the files to the www-data group though.
My controller is simple.
class AdministratorController < ApplicationController
def login
end
end
And my file is views/administrator/login.html.haml.
I'm getting an error -
ActionView::MissingTemplate (Missing template administrator/login, application/login with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder]}. Searched in:
* "/var/www/sitename/app/views"
):
Try to add to your Gemfile
gem 'haml-rails'
And run bundle install.
The issue has been resolved. I'm not sure what exactly went wrong with the template but I began seeing a different error relating to compiled assets. I just recompiled the assets and restarted the server. Thanks for all your help!

Action controller: Exception Caught while trying to acces recently generated controller on empty Ruby on Rails project

I am new to ruby on rails, just trying to follow some tutorials.I just entered:
rails generate controller helloWorld index
then i started rails server and tried to access http://localhost:3000/hello_world/index
and got
Action controller: Exception Caught
ActiveRecord::ConnectionNotEstablished
ActiveRecord::ConnectionNotEstablished
in the browser
Did you run rake db:create db:migrate before starting the server.
If you did, pls check your database configuration in config/database.yml. If you can't figure it out, please let us know the contents of that file.

How to solve the following rails 3 error: ArgumentError (Syck is not missing constant BadAlias!)?

I've got a strange error with a rails 3.0.3 application running on ruby 1.9.2, as a matter a fact it doesn't run yet, beacause I get the following error:
ArgumentError (Syck is not missing constant BadAlias!):
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (14.4ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (19.4ms)
Is because of the ruby version? Or how can I solve this?
-- later edit:
On ruby 1.8.7 EE, I have no such error.
After searching and searching the internet, I started to look at all my YAML in my app, and I validate each file using: http://yaml-online-parser.appspot.com/, and I've got errors like:
while parsing a flow node
expected the node content, but found ':'
in "<unicode string>", line 147, column 13:
order: [:day, :month, :year]
Therefore everything was because the yaml errors. The problem is with unicode, in seems that its different on ruby 1.9.2 than in 1.8.7.

Devise RPX Connectable error undefined method user_session_url

I am trying to install the devise_rpx_connectable gem functionality into my application. Everything seemed to install fine but when I try to call
<%= link_to_rpx "Signin using RPX!", user_session_url %>
I get an undefined method error on user_session_url
Any ideas on what is causing this?
It turns out I had messed up on the initial generation of the devise model. I backed out and re-did it and everything started to work.