Displaying 20 results from an estimated 20000 matches similar to: "Does a method string.to_class exist?"
2007 Feb 23
2
[RoR],[C.L.R] How I convert a string object into a class?
People,
Lately I''ve been using the .name() method of classes.
For example:
Person.name
=> "Person"
Today...
I''d like to do the inverse:
"Person".to_class
=> Person
How do I transform a string into a class?
I''m working with a Rails app where I need to
get names of AR classes at run-time.
-Peter
2008 Dec 28
7
2.2.2 simple_captcha upgrade error
So thanks to Craig, i got up and running on rails 2.2.2, though now i''m
dealing with a whole new can of worms. I''ve done a good bit o searching
and haven''t found any solid leads. I''m using the simple_captcha plugin
on my site, and all is well until i call that plugin.
http://www.pastie.org/347721
ActionView::TemplateError (undefined method
2008 Oct 28
3
Backwards N+1 problem
Hey, i’m running into an N+1 problem, but i don''t exactly know how to
:include in this situation. (controller code is at the bottom).
I''m trying to find all of the highest ranked definitions, and then
render their associated phrases.
A Phrase has many definitions. A Definition has many children
I already have all the info i need stored in @definitions, so this
should only
2009 Jan 31
9
Maxima and Ruby Integration
I''m looking to write a javascript heavy clientside program with a
something serverside backend that connects to the free maxima math
program. I have extensive knowledge of ruby on rails, so I would prefer
to call Maxima with ruby, but I don''t know if this is even possible. Its
fairly easy to call Maxima (with a lisp implementation) using ANSI C, it
is a little less easy to
2008 Dec 02
1
form_for with partial using do |@f|
Is it possible to pass this FormBuilder object to a controller and then
back to a partial?
I have a form rendering a partial that i would like to update with a
call to my controller based on user selectable parameters, but when the
AJAX comes back, i get this error message because i cannot pass a form
builder object between the controller and the view:
"undefined method
2008 Nov 21
1
uninitialized constant ActionController::Caching::Fragments
Hey, i''m trying to use "s3cache" plugin with my app, but after adding it
to my vendor/plugins directory and following the install steps i''m
getting this error after running script/server:
/Users/richardschneeman/Documents/AptanaStudio/slangasaurus/vendor/rails/activesupport/lib/active_support/dependencies.rb:275:in
`load_missing_constant'': uninitialized
2009 Apr 01
3
make a <tr>clickable
I would like to make an entire table row clickable so the user will be
directed to another url. If i was using hand written javascript i would
just add an onclick to the <tr>, but i want to use rails routes and to
be able to pass in parameters from ruby. What is the best way to
accomplish this?
<tr onclick = <%= link_to my_route_path %> > <td>content</td></tr>
2009 Aug 02
13
NoMethodError in User sessionsController#create - Authlogic
Hi,
I''m beginner in rails, and I wanted to add to my simple application
Authlogic. So I''ve watched http://railscasts.com/episodes/160-authlogic
and step-by-step done everything. And almost everything works fine,
except login in. After registration new user is automatically logged in,
he can edit his profile, but after clicking logout and trying to login
again I get error
2008 Aug 21
4
forgery Protection
Has anybody solved this issue. [
http://rubyforge.org/pipermail/facebooker-talk/2008-April/000552.html ] ?
NameError (undefined local variable or method `controller'' for
#<LeaveController:0xb7144abc>):
/app/controllers/application.rb:24:in `verify_authenticity_token''
2008 Jun 02
3
Undefined method `store_full_sti_class=' for ActiveRecord::Base:Class (NoMethodError)
Hi everyone,
I created a new demo app with ''rails demo'' and proceeded to try and
launch the server with ''ruby scripts/server''.
I get the following stack:
C:\railsProj\demo>ruby script/server
=> Booting Mongrel (use ''script/server webrick'' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to
2008 Jun 26
1
Undefined method: camelize
Hi,
I am fairly new at Rails, and attempting to deploy an application
that''s running fine using InstantRails on my PC. On the deployment
server (I use railsplayground.net), I get the following error:
Processing ApplicationController#index (for 220.224.229.156 at
2008-06-25 18:49:34) [GET]
Session ID: 5921e7d789ee3aaa214f2d59aa40986a
Parameters: {"action"=>:index,
2008 Jun 12
11
auto_complete with multiple params
I''m using the auto_complete plugin, and it works great, my problem is i
need to pass multiple parameters to the controller other that what is
typed in the text field.
<%= text_field_with_auto_complete :search, :contains, :size => 15,
:frequency => 0.1, :skip_style => true -%>
This is what i have as of now, but i also need to pass ":language =>
@default"
2008 Dec 17
1
My first rspec reports "undefined method `key?' for #<String:0x46b1df0>"
this my first rspec test, it is very simple
-----------------------------------------------------------------------------------------------------------------------------------------
>
require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'')
describe Doc do
fixtures :docs
before(:each) do
@doc=docs(:yjn_bjy)
end
it "should create a new instance
2008 Oct 02
1
acts_as_taggable_on environment issues
Like most people, I''ve got two machines: one for development and one
for production. I''ve done everything I can to make sure the ruby/rails
environments are the same, but of course they''re not identical (I''ll
get into that in a moment). The error that I''m getting happens when I
call a method in a background task controller on the production
machine; I
2009 May 26
3
ruby and MySql
Hi there - new to RoR but very excited about it indeed -
I have just manged to install everything.
However, when I browse to http://localhost:3000/ then click the "About
your application’s environment" - from the console I get :
Status: 500 Internal Server Error
no such file to load -- mysql
Perhaps someone can tell from my configuration what is wrong ??? What I
may be missing ??
2008 Jun 24
2
upgrade issues
I tried upgrading my older 1.8.6 Ruby install to the latest stable
1.8.6 release, version 1.8.6-p230 specifically, to benefit from the
latest security updates.
I used this configuration:
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr
I''m using mod_rails, so after the Ruby install I restarted Apache. I
then found every Rails app on the box was non-functional,
2012 Sep 25
9
Any rails experts able to offer some advice?
Hello all.
#1 I am working on a rails3 gem called Yarder
(https://github.com/rurounijones/yarder). The goal of this gem is to
replace the rails logging system with one that is JSON based rather than
string based.
#2 To this end I also recently asked this list about making the
LogSubscribers subscriptions to ActiveRecord::Notifications configurable
and am looking at submitting a patch
2008 May 15
6
mysql errors in production after upgrading to rails 2
I''m trying to upgrade our production server to rails 2. I''ve already
done this on my dev machine (osx) and it worked fine. But now, with
everything at the same version, but running in production mode, the
production machine - a CentOS5 box - is getting loads of:
ActiveRecord::StatementInvalid (Mysql::Error: Lost connection to MySQL
server during query
errors.
i"ve looked
2008 Jul 08
5
map.root doesn't do anything, index.html can't be changed
Environment:
Apache/2.2.8 (Ubuntu)
DAV/2
SVN/1.4.6
PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch
mod_ruby/1.2.6
Ruby/1.8.6(2007-09-24)
mod_ssl/2.2.8
OpenSSL/0.9.8g
Phusion_Passenger/2.0.1 Server
I''ve created several scaffolds that all work, and am trying to set the
root page for this app to default to one of the methods. Here''s my
routes.rb:
ActionController::Routing::Routes.draw do
2009 Sep 30
3
How to search and replace all urls on a HTML string using RUBY gsub
Hi ,
I trying to search and replace all urls on a HTML string
using gsub .
CODE
html = "<a href=''http://site.com.br''><img src=''http://site3.com/
image.jpg''></a><a href=''http://newx.com.br''><img src=''http://localhost/
imagem.jpg''></a>";
pattern = /<a