Feeds : Ruby on Rails - Talk in Google Groups


      view feed content Re: [Rails] Re: How to make a Rails app multi-language (Ruby on Rails - Talk in Google Groups)   4 months ago
<shameless self-promotion>
You can even translate your URLs and use them to set the user language:
[link]
</shameless self-promotion>

View original post|Add to del.icio.us | Share

      view feed content Re: [Rails] Undefined method: camelize (Ruby on Rails - Talk in Google Groups)   4 months ago
camelize is a string method, it's not defined on symbols. Normally
that portion of your log would have the action/controller as strings,
not symbols.
Something iffy in your routes maybe? Also you seem to be deploying
your app against 2.1 but developing it against 2.0.2, I would really
recommend that you use the same version in both places.

View original post|Add to del.icio.us | Share

      view feed content Re: Undefined method `store_full_sti_class=' for ActiveRecord::Base:Class (NoMethodError) (Ruby on Rails - Talk in Google Groups)   [18 views] 4 months ago
I found that commenting out that line (new_rails_defaults.rb:8) gets rid
of the error and things still work.
Iros wrote:

View original post|Add to del.icio.us | Share

      view feed content Re: Unit Test: Mocking the User-Agent (Ruby on Rails - Talk in Google Groups)   4 months ago
Hi Jeremy,
thanks for the reply.
How exactly do i build a testRequest? ive never come across such a
thing?
Chris

View original post|Add to del.icio.us | Share

      view feed content Re: Freeze and dependence problems? (Ruby on Rails - Talk in Google Groups)   4 months ago
On Jun 26, 4:37 am, Fernando Brito <rails-mailing-l...@andreas-s. net>
wrote:

will_paginate probably doesn't realise that a non gem version of
activesupport is already loaded. Are you using the latest version of
will_paginate ?

Fred



View original post|Add to del.icio.us | Share

      view feed content Re: Saving list of IDs in a :string type field? (Ruby on Rails - Talk in Google Groups)   4 months ago
You;ve got to convert it to a string. Either use serialize as Phillip
suggested or foo_ids = session[:language_ids].join(', ') (and then the
corresponding split whenyou retrieve the row from the database). The
default to_s on Array doesn't do anything very useful in this case.

Fred



View original post|Add to del.icio.us | Share

      view feed content Re: Using another objects methods within another object (Ruby on Rails - Talk in Google Groups)   4 months ago
Sounds like find_upcoming_events should be a class method on Event,
which would mean you could call Event.find_upcoming_events (which I'd
probably shorten to Event.find_upcoming) anywhere you want. If that
sentence was gibberish, I suggest you read a little more about ruby/
object oriented programming in general.

View original post|Add to del.icio.us | Share

      view feed content Re: using YUI uploader / authentication_token set but still error / session issue? (Ruby on Rails - Talk in Google Groups)   [3 views] 4 months ago
Dear michael:
I'm Edward from Taipei,Taiwan and I am currently using the YUI
uploader with rails, too. Just want you to know that don't forget the
spirit of Rails:"Keep it simple!"
To use YUI uploader with Rails is very simple. First, don't mind
the "authenticity_token". All you have to do is simply change a bit code

View original post|Add to del.icio.us | Share

      view feed content ActiveRecord get all columns including those belonging (Ruby on Rails - Talk in Google Groups)   4 months ago
Hi,
Just new to Rails,, and i have some questions :
How can i use ActiveRecord associations to retrieve all columns and rows
including the columns and rows in the referenced table.?
*SELECT parents.id, parents.parent_name, kids.id, kids.parent_id,
kids.kid_name
FROM parents left join kids on parents.id = kids.parent_id

View original post|Add to del.icio.us | Share

      view feed content helpers spec references (Ruby on Rails - Talk in Google Groups)   4 months ago
I saw very minimum helpers spec references on the net unless one video I
saw on peepcode that contains one chapter talking about helpers spec,
well the example there showed us how to stub and then should receive
from session, model, but no example to show how to do should receive
plain html, like so:

View original post|Add to del.icio.us | Share

      view feed content Re: tough call on rails hosting site (Ruby on Rails - Talk in Google Groups)   4 months ago
A VPS solution really is the way to go. Having said that if you really
want shared hosting then perhaps hostingrails.com is the way to go as
they have mod_rails (Phusion Passenger) shared rails hosting, and that
is a lot better than FastCGI.

On Jun 26, 4:12 pm, Scott Kulik <rails-mailing-l...@andreas-s. net>



View original post|Add to del.icio.us | Share

      view feed content Re: Managing Google Calendar Integration (Ruby on Rails - Talk in Google Groups)   [1 views] 4 months ago
Hey I didn't see this thread again until now, but let me try to go
through here and cover a few things:
Matt mentioned a problem with dealing with non-default calendar. With
the gcalapi this is actually quite easy. I am only familiar with the
gcalapi library because it has worked out for me so far. Long story

View original post|Add to del.icio.us | Share

      view feed content Overriding default values - model advice (Ruby on Rails - Talk in Google Groups)   4 months ago
I am looking for some advice in putting together the proper models and
relationships in my application. My concern revolves around the
requirement to have default prices, but allow them to be optionally
overridable.

The application involves clients choosing from menus of various
dishes. Several menus are predefined and the client chooses the one



View original post|Add to del.icio.us | Share

      view feed content tough call on rails hosting site (Ruby on Rails - Talk in Google Groups)   4 months ago
I have a site wl.kuliksco.com which i'm currently running on my home
computer.
i get about 600-700 hits a day but plan on getting into the few
thousands in the next month.
my pages each have about 100 thumbnails each around 1k a piece but the
database tables will only have a few thousand rows each. i'm not really

View original post|Add to del.icio.us | Share

      view feed content Re: calendar implementation (Ruby on Rails - Talk in Google Groups)   4 months ago
Hey, do you know how to test google calendar while in production mode
on my local server. Is it possible to actually send data to the
google calendar and update it to see if it is working?
thanks, Dave

On Jun 20, 8:23 pm, Dhaval Parikh <rails-mailing-l...@andreas-s. net>
wrote:



View original post|Add to del.icio.us | Share

      view feed content Re: Trying to use find my model but I get an error (Ruby on Rails - Talk in Google Groups)   4 months ago
Yeah sorry my fault I posted an old version and didnt look.

What I did is that I created a module called PassageFinder instead

module PassageFinder

def previous
find(:first, :conditions => ["time < ?",Time.now], :order => "time
DESC")
end

def next
find(:first, :conditions => ["time > ?",Time.now], :order => "time



View original post|Add to del.icio.us | Share

      view feed content Rails App Database in MySQL - OK, However what if I need to access multiple Databases of different types ie. Sybase, MSSQL and Oracle (Ruby on Rails - Talk in Google Groups)   4 months ago
Hi,

Although I am an experienced developer, I am new to rails and enjoying
how easy it is to build applications.
I seem to have come across a stumbling block and was wondering if
anyone out there has come across the same problem and could suggest
possible solutions.

Problem:

I have an intranet-based application in a company network - using



View original post|Add to del.icio.us | Share

      view feed content Freeze and dependence problems? (Ruby on Rails - Talk in Google Groups)   4 months ago
Hello
I have a server using Rails 1.1.6
So I developed my application on my computer, with Rails 2.1
After that I did a rake rails:freeze:gems. That sent Rail gems was sent
to /vendor/rails
I sent my application to server, configured, and everything was working
fine, using Rails 2.1 Freezed Version.

View original post|Add to del.icio.us | Share

      view feed content Re: [Rails] Switching to production - OCIError (ORA-12154: TNS:could not resolve the connect identifier specified): (Ruby on Rails - Talk in Google Groups)   [15 views] 4 months ago
hey, can u post ur database.yml ? looks like production and development
connections are different and not setup correctly. Also confirm that
TNSNAMES.ORA has entry for both (dev and prod) of your config.
-Pavan
----- Original Message -----
To: "Ruby on Rails: Talk" <rubyonrails-talk@googlegroups .com>

View original post|Add to del.icio.us | Share

      view feed content Re: [Rails] Trying to use find my model but I get an error (Ruby on Rails - Talk in Google Groups)   4 months ago
You've declared the method 'previous' to be a *class* method (via the
"self."). But then you call it on an *instance* of that class.
Change the method to this:
def previous
class.find(....)
end
Also, youre conditions specify two arguments, but only one '?' to
substitute in a value. And you'll want to remove the "self." from

View original post|Add to del.icio.us | Share

      view feed content custom select still wrapped in fieldWithErrors? (Ruby on Rails - Talk in Google Groups)   4 months ago
I noticed today that if I build my own <select ...> tag, even with the
right id, it doesn't get wrapped in the fieldWithErrors div on a
validation error. If, I use one of the select or collection_select
helpers, it does get wrapped (so my custom CSS kicks in).

I'm wondering: is there a way to force the fieldWithErrors wrapping?



View original post|Add to del.icio.us | Share

      view feed content Switching to production - OCIError (ORA-12154: TNS:could not resolve the connect identifier specified): (Ruby on Rails - Talk in Google Groups)   4 months ago
Hi all.

Ruby version: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Rails version: rails 1.2.3

I finished my first RoR application (Rails and Oracle, using the oci
adapter). I am pretty close to production install time and I thought I
had done my homework and learned how to setup the production



View original post|Add to del.icio.us | Share

      view feed content Trying to use find my model but I get an error (Ruby on Rails - Talk in Google Groups)   4 months ago
Hello everyone,

I'm pretty sure that my problem is easy but I've been fiddling with
this for an hour and I cannot see why it's not working

So in my model I defined this method :

def self.previous
find(:first, :conditions => ["time
< ?",self.time,self.stop_id], :order => "time DESC")



View original post|Add to del.icio.us | Share

      view feed content Undefined method: camelize (Ruby on Rails - Talk in Google Groups)   [9 views] 4 months ago
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: 5921e7d789ee3aaa214f2d59aa4098 6a



View original post|Add to del.icio.us | Share

      view feed content mashup question (Ruby on Rails - Talk in Google Groups)   4 months ago
I have a question regarding mashup development. I am currently
developing a google mashup application and am wondering how to test
its functionality. I am not sure if I can communicate with the google
calendar and actually input information into the calendar while in
development mode. Does anyone know how to do this? Do I actually

View original post|Add to del.icio.us | Share

      view feed content Saving belongs_to associations (Ruby on Rails - Talk in Google Groups)   [2 views] 4 months ago
I'm trying to save a username along with profiles (User has_many
Profiles; Profile belongs_to User). I had a portion of this working
(updating user info) but I cannot create new user records.
I get the following error:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.build



View original post|Add to del.icio.us | Share

      view feed content Re: regex question (Ruby on Rails - Talk in Google Groups)   4 months ago
thanks a million

View original post|Add to del.icio.us | Share

      view feed content Using another objects methods within another object (Ruby on Rails - Talk in Google Groups)   4 months ago
Hey,

I'm just getting used to ruby on rails and im designing a website that
has a forum and a list of events. So there are two models: forum and
event.

I've got a method for event called find_upcoming_events which is used
to list all future events. But I'd like to show the upcoming events at



View original post|Add to del.icio.us | Share

      view feed content Data Too Long Error For blob Column (Ruby on Rails - Talk in Google Groups)   4 months ago
I am trying to upload a 432 KB exe file to a column in mysql that is
type blob . It can upload pdfs and rtfs and docs and but when I try to
upload even a jpg which is barely 184 kb it gives the error (data too
long) why is that? (detailed error in file) :
ActiveRecord::StatementInvalid in StoragesController#create

View original post|Add to del.icio.us | Share

      view feed content Re: [Rails] regex question (Ruby on Rails - Talk in Google Groups)   4 months ago
> newTerms = string.gsub(/[^\w\s]/, "")
=> "john tony"
is one way...

View original post|Add to del.icio.us | Share