similar to: Webrick Failing with Illegal Instruction

Displaying 20 results from an estimated 20000 matches similar to: "Webrick Failing with Illegal Instruction"

2012 May 21
4
Rendering partial views with ajax calls in rails 3.1
I''m starting now with rails, and i have simply question i think. I need to render two partials in one ajax call: I have the following controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id]) respond_to do |format| format.html #show.html format.js format.json { render :json => @host } end
2011 Aug 13
3
How to make an AJAX call to different domains in Ruby on Rails 3.0
I have an action email in my controller of application running on www.example.com and I am trying to send the form data of email to www.data.example.com/email where my another application receives the request and I am able to save the data in js format. But I want to send back the acknowledgement to www.example.com and replace the html using rjs template. Here are some code for you reference:
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 =>
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
2011 Sep 06
8
Ajax and rails 3 UJS (jquery)
Hi, guys, I''m in the midst of moving an app from rails 2.3.8 to rails 3.0.9. Sadly, rails 3 no longer has javascript generators and I''m now forced to do more javascript. For my project, I have selected jQuery as the javascript framework for my rails 3.0.9 app. What I have done to have my app''s deletion link (for each item) trigger an alert box when the deletion
2010 Sep 04
3
its easy but i forgot all
my models borrower ----- has_many :loans loan ----- belongs_to :borrower my loans _controller def new @borrower = Borrower.find(params[:borrower_id]) logger.debug '' @borrower.id'' logger.debug @borrower.id @loan = Loan.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @loan } end
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
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
2012 Apr 14
7
undefined method `model_name' for NilClass:Class
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true validates :start_date, :presence => true end Controller: class ActivitiesController <
2010 Sep 27
9
Rails 3 - Creating a comment and then returning the Partial with JUST the new comment
Here''s the flow I have... First, jquery posts the new comment to the server: $.post(this.action,$(this).serialize(),null,''script''); Then in the comments controller: def create @comment = lots of stuff going on here but it works... if @comment.save flash[:notice] = "Successfully created comment."
2013 May 27
6
Headache with Ajax in Rails using jQuery
Hello everyone, I''m a newbie at Ruby on Rails. I spent nearly two days of the Memorial Day weekend stumbling upon making Ajax working in Rails. At this point, I''m so exhausted and hope that I can get some help to move forward. I have tried nearly everything I found on Google but still not successful. Initially, I tried the Ajax approach offered by Rails but did not work, so I
2011 Feb 19
2
Active Record Query
A course has many lessons and a lesson has many topics. A topic can have a recipe or vice versa, a recipe has many topics (optional). I need to come up with the most efficient way of querying the database to find those topics belonging to a course (via lessons of course) which have a recipe (in other words recipe_id is not null for this topic record). Simple but challenging :) Thanks for your
2011 Jan 26
13
undefined method `model_name' for NilClass:Class
I am new to Ruby on Rails and have a very simple foreign key example that is driving me nuts. I am using Rails 3 under Windows Vista and have two tables: users and user_comments. user_comments.user_id should point to the user a comment is about. In my show view for user I have a link to the new method of user_comments to allow a comment to be created. This throws: Showing
2011 Jul 11
2
Pre-populating association
Hello, I think this is an easy one for the average Rails developer but I''m a bit stuck. I''m creating a simple voting app: any user can create a survey, with any number of questions, and other users can then vote by creating a ballot for that survey. Here''s the modeling: class Survey < ActiveRecord::Base has_many :questions has_many :eligibilities has_many
2012 Nov 29
2
[Rails 3.2] form_tag w :remote => true doesn't fire up the js format
I have a form_tag written like this : = form_tag search_backoffice_places_path, {:remote =>"true", :id => :searchplaceForm } do .. input fields = submit_tag t(:search) generated html is correct : <form accept-charset="UTF-8" action="/en/backoffice/places/search" data-remote="true" id="searchplaceForm" method="post"> ...
2012 Dec 13
23
make rails connect with database
i''m newbie in rails. i have problem with how to connect rails with database. before i can connect it with command "rake db:create" to create database. and "rake db:migrate" to migrate schema to database. but, i want to connect rails with database that i have before, not create it via rails. can you help me? -- Posted via http://www.ruby-forum.com/. -- You received
2013 Mar 06
2
Refresh a partial onClick using ajax call in rails 3.x
Hi All, I want to refresh a partial onClick, onClick i am making ajax call and getting the data but i am unable to refresh the partial. here is the code IN views: home.html.erb $(document).ready(function() { var currentCellText; $(".inline").click(function() { currentCellText = $(this).text(); $.ajax({ type: ''GET'', dataType: "json",
2010 Aug 23
3
Unable to upload images using native rails file upload
I am a rails newbie and am trying to build my first app. I have a jobs and categories controller and models respectively. CONTROLLER: def new @job = Job.new @catergory = Catergory.all respond_to do |format| format.html # new.html.erb format.xml { render :xml => @job } end end #THIS IS A group of 10 RADIO_BUTTONS TO SELECT A CATEGORY FROM. BY DEFAULT THE FIRST
2011 Jan 11
9
Can I omit respond_with.
If I don''t want xml results but only html can I omit respond_with in some actions? For example index from: respond_with(@sectors = Sector.all) becomes only @sectors = Sector.all isn''t it? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday. I would go to the root of my site and I would get a Too Many Redirects message. It seems like there was an infinite loop. After struggling for over an hour yesterday late at night, it seemed like I fixed it. But now, when I want to create a New User, it''s redirecting me to the Sign In screen. Seems like I didn''t fix the problem completely. I