Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4014132
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:27:35+00:00 2026-05-20T09:27:35+00:00

I am developing a rails application which should send push notifications to iOS devices.

  • 0

I am developing a rails application which should send push notifications to iOS devices. I am using apn_on_rails gem. Everything works fine in the rails console. However when I run the server, I get undefined method errors for all the basic view methods such as content_for or form_tag etc:

When I take require 'apn_on_rails' from my development.rb out, the views work again, but of course without push notifications.

Here is an example trace:

Processing DashboardController#index (for 127.0.0.1 at 2011-02-27 13:55:59) [GET]
User Load (0.2ms)   SELECT * FROM "users" WHERE ("users"."id" = 1) 
CACHE (0.0ms)   SELECT * FROM "users" WHERE ("users"."id" = 1) 
Rendering template within layouts/dashboard
Rendering dashboard/index

ActionView::TemplateError (undefined method `content_for' for #<ActionView::Base:0x103343970>) on line #1 of app/views/dashboard/index.html.erb:
1: <% content_for :header do %>
2:  <%= render :partial => "header", :locals => {:title => "Dashboard"} %>
3: <% end %>


app/views/dashboard/index.html.erb:1
app/controllers/dashboard_controller.rb:6:in `index'

Rendered rescues/_trace (28.5ms)


Processing ApplicationController#index (for 127.0.0.1 at 2011-02-27 13:55:59) [GET]

ActionView::TemplateError (undefined method `debug' for #<ActionView::Base:0x103343970>) in /Library/Ruby/Gems/1.8/gems/actionpack-2.3.8/lib/action_controller/templates/rescues/_request_and_response.erb:



Rendered rescues/_trace (24.0ms)
/!\ FAILSAFE /!\  Sun Feb 27 13:55:59 +0100 2011
 Status: 500 Internal Server Error

ActionView::TemplateError (undefined method `debug' for #<ActionView::Base:0x1031eaad8>) in /Library/Ruby/Gems/1.8/gems/actionpack-2.3.8/lib/action_controller/templates/rescues/_request_and_response.erb:




In /library/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/templates/rescues/_request_and_response.erb

Thanks for any help…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:27:36+00:00Added an answer on May 20, 2026 at 9:27 am

    It is not evident whether you call config.gem 'apn_on_rails' – it sounds more like you are require:ing the library, which probably is something you should not do at this point: the point of environment setup.

    Have the config.gem things in your environment setup (i.e. development.rb), but make eventual requires happen later (->in the controller / model / helper in question).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing a Rails application using a database that was designed before
We are developing a considerably big application using Ruby on Rails framework (CRM system)
I'm developing a new rails application which is supposed to be installed several times
I am developing a Rails application which will need frequent access to public APIs,
I have a Ruby on Rails application that I'm developing on my computer, which
I am developing a Rails application that will access a lot of RSS feeds
I'm using the RESTful authentication Rails plugin for an app I'm developing. I'm having
I'm developing an auctions application in which bids are held in a table with
I am developing a web app (using rails) that I will be launching within
Developing a .NET WinForms application: how can I check if the window is in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.