Displaying 20 results from an estimated 30000 matches similar to: "uninitialized constant Mime::HELLO"
2007 Jan 17
1
AJAX GET requests returning "uninitialized constant Mime::RJS"
Hey all, I thought this was working until recently. I''m using
link_to_remote:
link_to_remote("More info", :url => user_path(user),
:update =>
"show_#{user.id}",
:method => :get) #
NOTE: "GET" request
This then updates a hidden div ("show_123"
2012 Feb 18
0
Rails NameError : uninitialized constant RelationshipsController
I am trying to run a test of my app buy my
relationships_controller_spec.rb file won''t run. Here''s the error I
get:
Exception encountered: #<NameError: uninitialized constant
RelationshipsController>
Here''s the code for my relationships_controller_spec.rb file:
require ''spec_helper''
describe RelationshipsController do
describe "access
2011 Apr 30
8
"uninitialized constant PostsController::Post"
This time i read scaffold tutorial very carefully and finally try to
generate a form without using the scaffold(just used a controller and
view ).what i have done till now ,is as follow.Using rails 3.0.7.
"rails generate controller posts
index"
1) post_controller.rb
class PostsController < ApplicationController
def index
@post=Post.new
2009 Apr 03
7
RJS not rendering correctly when mime-type is 'iphone'
I have an iPhone version of my site, and for some reason none of the
rjs works when viewing the iPhone version. This happens instead:
ActionView::MissingTemplate (Missing template controller_name/
update.erb in view path app/views)
The rjs works fine when viewing the site normally, and it worked when
viewing the iPhone version prior to upgrading Rails to 2.3.2.
Additional info: I have
2010 Feb 25
9
uninitialized constant UsersController::User
i just created an application to list the primary details of
userbut it is showing an error lik this
"uninitialized constant UsersController::User"
this is my controlller
class UsersController < ApplicationController
puts"hiiiiiiiii"
def index
puts"hiiiiiiiii"
@users = User.find(:all)
puts @users
respond_to do |format|
format.html # index.html.erb
2007 Sep 01
0
Problem with custom Mime::Type.register.
Hello all,
I''m running into a slight problem with Rails and the respond_to function
in controllers. I''ve registered a custom Mime::Type of application/x-amf
:amf (Mime::Type.register "application/x-amf", :amf). The problem I''m
having is that the respond_to function never responds to the
application/x-amf content-type.
I think I''ve narrowed it down to
2006 Jun 08
0
custom mime types for respond_to
Is there a way to add a mime type of my own to respond_to ?
There''s html, xml, js, ical etc ...
But I want to be able to respond_to Excel.
Excel has the following content-type header:
application/vnd.ms-excel
I want to use the new ?format=xml querystring parameters that respond_to
can respond to.
So I want to pass in ?format=xsl or ?format=ms-excel so that I can
return my results
2008 Jan 16
0
respond_to, mime types and excel
Hello All,
I''m trying to figure out how respond_to actually works, especially with
the increased focus on REST.
After I set a MIME type for Excel
Mime::Type.register "application/vnd.ms-excel", :xls
In my index action''s respond_to block
I have format.xls {
@parts = Part.find(:all)
headers[''Content-Type''] =
2010 Sep 05
0
Responding to a non-registered MIME type?
I''m trying to figure out how attachments are supposed to work with MIME
type-based responses. What makes attachments special is that in many
cases they are allowed to be arbitrary files. It would be too
restrictive to require that all possible types are registered
(Mime::Type.register).
Let''s say for GET requests on an attachment resource I want to return
metadata if the
2008 Mar 14
3
`const_missing'': uninitialized constant Spec::Rails
Hi!
I''m experiencing such error while running simple model rspec just to
make sure everything is working.
$ script/spec spec/models/site_user_spec.rb
/var/lib/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
`const_missing'': uninitialized constant Spec::Rails (NameError)
from
2010 Nov 08
7
Webrick Failing with Illegal Instruction
I''ve just started a new rails project (3.0.1, ruby 1.9.2 on Mac OS X),
and have a few parts of it built out. I''ve just created new
controller/views using rails g scaffold_controller Lesson, and then
added a route to routes.rb with "resources :lessons"
Now, when i go to /lessons, Webrick fails with "Illegal instruction"
The controller function getting hit is
2006 Jun 24
5
request.xhr? vs. respond_to
Searched around this forum, but didn''t find an answer for this question.
Can you help this newbie understand any overlap and/or difference
between request.xhr? and respond_to?
If request.xhr? is true, should I expect it wants.js below?
respond_to do |wants|
wants.html { redirect_to(person_list_url) }
wants.js
wants.xml { render :xml => @person.to_xml(:include
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All,
just in a spot of bother with this gem, I am trying to create a new
location and get the above msg.
here is my controller:
class LocationsController < ApplicationController
# GET /locations
# GET /locations.json
def index
@locations = Location.all
@json = Location.all.to_gmaps4rails
end
respond_to do |format|
format.html # index.html.erb
2008 Mar 18
4
respond_to formats, fbml and fbjs
In my controllers I have a respond_to block for both fbml and fbjs.
I created the fbjs mime type in environment.rb:
Mime::Type.register "application/javascript", :fbjs
However, even if I specify fbjs in a parameter name format during AJAX
post requests, it is being overwritten by Rails or Facebooker as FBML.
I confirmed this by placing logger.debug params[:format] immediately
before
2008 Mar 07
0
Extended Mime Responder functionality
Using custom mime types, I''ve run into instances where I end up
calling the same function over and over again for a specific type.
After a little tweaking I came up with a monkey patch that allows to
pass a default block at mimetype registration time, and allows
responder block calls to take arguments. I uploaded the monkey patch
so let me know your thoughts. It currently only works for
2008 Feb 04
3
Hello World: uninitialized constant ApplicationController
Have the Wrox guide, but still having problems getting my hello world to
run (very frustrating! ;-) Installed latest InstantRails package for
Windows (XP). Thank you so much for helping!!
Dirk
After creating the project directories, I created my
\app\controllers\greeting_controller.rb file:
class GreetingController < ApplicationController
def greeting
end
end
Then put in my
2010 Aug 21
1
Rendering a different Javascript file in respond_to
Hi everyone, I am stuck in an (apparently) simple problem.
In my event_controller I have the i_like_it action:
def i_like_it
@event = Event.find(params[:id])
... # logic
respond_to do |format|
format.js
end
end
In my case "i_like_it" is called with :method => PUT (it is an Ajax
call, "i_like_it.js.erb" will be returned as a script and it wil be
2008 May 15
8
facebooker, respond_to and firefox 3 beta5/pre
Hi there,
I have a controller that responds to fbml and html, with html at the
top.
In all browsers, this works as expected - When I''m hitting the
controller from my normal app, I get html. When I hit it inside
facebook, I get fbml.
However, with Firefox 3 hitting the normal app, I''m getting fbml for
some odd reason.
Am I crazy?
Sudara
2006 Oct 12
6
BackgrounDRb newbie stuck at first base. Fresh pair of eyes needed
Can''t believe I can''t see the problem here, but after a few hours
bashing my head on a brick wall, going to risk looking stupid by seeing
if anyone can point out my idiocy (that''s the worst thing about coding
on your own).
Trying to get BackgrounDRb to take over the scraping task which is
currently being done in a Rails controller. That''s not the problem at
2010 Sep 27
6
Rails 3 + jQuery ; How to show error messages
Hi guys,
can anyone explain how to show error_messages_on (like back in Rails
2 , without Ajax) fields that didnt'' pass the validation the jquery
way.
I googled for about 2 hours now and found nothing. Jquery works fine
and adds the content to my table, but im totally stuck with the whole
error/validation thing.
My form looks like this:
<%= form_for Translation.new , :remote =>