PS. Actually I've just seen in this RailsCasts episode that Ryan
seems to have a nested model controller that does translate the parent
& child model data from the form to parent model and its association
(child model). Am I missing something Frederick re whether you may
have been wrong here?
Duilio Ruggiero wrote:
> RichardOnRails wrote:
>> Hi,
>>
>> I'm developing a small Rails 2.2.0 app. I have a slightly modified
>> scaffold-generated file,
>> PayrollSys\app\controllers\cvs_items_controller.rb, as follows:
>>
>> class CvsItemsController < ApplicationController
>> # GET /cvs_i
RichardOnRails wrote:
> Hi,
>
> I'm developing a small Rails 2.2.0 app. I have a slightly modified
> scaffold-generated file,
> PayrollSys\app\controllers\cvs_items_controller.rb, as follows:
>
> class CvsItemsController < ApplicationController
> # GET /cvs_items
> # GET /cvs_items.xml
>
Hi,
I'm developing a small Rails 2.2.0 app. I have a slightly modified
scaffold-generated file,
PayrollSys\app\controllers\cvs_items_controller.rb, as follows:
class CvsItemsController < ApplicationController
# GET /cvs_items
# GET /cvs_items.xml
require 'find'# A
is anybody running Graticule 0.2.8 successfully? My site is using the
acts_as_geocodable plugin and when I load the console or restart my
mongrels, I get this error...
vendor/plugins/acts_as_geocodable/init.rb:4:in
`evaluate_init_rb':RuntimeError: Graticule >= 0.2.0 is required for
acts_as_geoco
Thanks for the reply Fred,
Yes I did as you suggested and saw that the ports were being used by
another instance of mongrel which had been started somewhen, maybe
during testing or something.
I killed these processes then mongrel played nicely.
Now I have to work out why subdomain_fu isn't work
Hi again, Fred,
I just started reading RubyGems Manuals using the URL you provided.
That's stuff I should have learned a long time ago. Thanks for
showing me how to get up to speed on RubyGems.
Thanks a lot for post that URL.
Best wishes,
Richard
On Nov 22, 4:45 pm, Frederick Cheung <[EMAIL P
Hi Fred,
Thanks for chiming in.
I changed config/environment.rb back to the original code, with one
change:
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
in order to run my first Rails 2 version.
I also introduced the line:
BUG_BUG_BUG_BUG_BUG_BUG_BUG_BUG_RLM
in my mal-name
Thanks, much appreciated.
On Nov 21, 3:16 pm, Gerhard <[EMAIL PROTECTED]> wrote:
> In terminal do gem list | greppassenger
>
> On Nov 21, 8:46 pm, Dan Paul <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > Sry if this sounds stupid, but how do I check to see whatversionof
> > phussionpassengerI am ru
thanks - I'm specifically looking at Dates so I might stick with the
below that seems to be working fine...
errors.add('start_date', 'is not in Date format') if
!start_date.kind_of?(Date)
cheers
On Sat, Nov 22, 2008 at 9:30 PM, Rick <[EMAIL PROTECTED]> wrote:
>
> Greg - you might take a loo
thanks for responding Frederick: So just to clarify you mean:
(a) I would have to do this in my controller in the "save" method right?
(b) so anyone that anyone using Rails that has nested models in their
views do have to do this too then? i.e. extract work in the
controller? i.e. there's no a
Jochen - I have mislav-will_paginate-2.3.6 running under Rails-2.2.2,
the app was migrated from Rails-2.2.0 with no changes. I can't say
anything about acts_as_taggable_on_steroids however.
Rick
On Nov 22, 1:39 am, Jochen Kaechelin <[EMAIL PROTECTED]> wrote:
> I always get the following problem
On 22 Nov 2008, at 23:02, Will wrote:
>
> The problem is that is the collection select object is repeated in a
> table of objects so this ID appears multiple times. To deal with it I
> created a collection_select object
> form> around each of these and tried to refer to them using $("#
I've upgraded an existing application from 2.1 to 2.2.2. All of the
integration tests failed, complaining about there being no 'secret'
defined in the session_store configuration options. There isn't a
secret defined, since we don't use the cookie session store (it's a
wap site, and many phone
The problem is that is the collection select object is repeated in a
table of objects so this ID appears multiple times. To deal with it I
created a collection_select object around each of these and tried to refer to them using $("#
{machine.fqdn}").machine_user_id.selectedIndex=whatever,
On Nov 22, 10:01 pm, jawosis <[EMAIL PROTECTED]> wrote:
> Hi Fred,
>
> what exactly do you mean by bad line endings?
> If there would be any bad line endings in:
>
> a) the rjs template - then, I should see the same error in the second
> rjs template (the one that works) using the same syntax...
Lucy wrote:
> Hi, all
>
> Now I am doing "Hotel" website where users can select room and arrival
> and leave dates,
> and I can put into shopping cart.
> So I want to create a search form where users can select dates
> such like:
>
> Checkin date
> <%= date_select 'checkin_date', params[:checkin_d
Hi Fred,
what exactly do you mean by bad line endings?
If there would be any bad line endings in:
a) the rjs template - then, I should see the same error in the second
rjs template (the one that works) using the same syntax...which istn't
the case!
b) the partials being called in the rjs templat
On Nov 22, 9:26 pm, musk <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm currently creating my first plugin in rails. It creates a model
> and a mixin for controllers. For testing purposes I need a test
> controller (sort of a mock) to which I can include my mixin and test
> wether the mixed in meth
Hello,
I'm currently creating my first plugin in rails. It creates a model
and a mixin for controllers. For testing purposes I need a test
controller (sort of a mock) to which I can include my mixin and test
wether the mixed in methods work. My problem is in order to do this I
either have to setu
On Nov 22, 9:38 pm, jawosis <[EMAIL PROTECTED]> wrote:
> I get a "syntax error, unexpected tIDENTIFIER, expecting kEND" when
> the following RJS template is rendered:
>
> page.insert_html :bottom, :requisite_table, :partial =>
> "insert_jobrequisite_select", :locals => {:job => @job, :counter =>
On Nov 22, 9:36 pm, "Bill Walton" <[EMAIL PROTECTED]> wrote:
>
> I'd definitely appreciate a link or two to how to make that work. That is,
> I've never figured out how to specify the 'whole package' of gems that
> should be pulled into play for a specific app. And then again there's the
> who
I get a "syntax error, unexpected tIDENTIFIER, expecting kEND" when
the following RJS template is rendered:
page.insert_html :bottom, :requisite_table, :partial =>
"insert_jobrequisite_select", :locals => {:job => @job, :counter =>
@counter}
page.alert("hi")
The same RJS template is rendered wi
Hi Fred,
Frederick Cheung wrote:
On Nov 22, 3:39 pm, "Bill Walton" <[EMAIL PROTECTED]> wrote:
> > The problem with specifying different version of Rails prior to
> > v2.0 has been the inability to specify the versions of the
> > _other_ gems your app needs. Instant Rails gets you around
> > tha
Schalk Neethling wrote:
> Hi all, thanks for the info. One thing though, from where in the
> InstantRials directory structure should I run these commands? Does it
> make a difference or can I simply run it from the root directory of IR?
>
> Thanks again,
> Schalk
>
> Norm wrote:
>
>> Jose vice
On Nov 22, 8:32 pm, Joe Blow <[EMAIL PROTECTED]> wrote:
> I am aware of page.update and page.replace_html but I was wondering how
> it actually works.
>
> Basically I have a callback from a scriptaculous effect that will update
> a div with the results of some partial so I can not use the built
I am aware of page.update and page.replace_html but I was wondering how
it actually works.
Basically I have a callback from a scriptaculous effect that will update
a div with the results of some partial so I can not use the built in
page.xxx calls.
--
Posted via http://www.ruby-forum.com/.
-
On Nov 22, 3:39 pm, "Bill Walton" <[EMAIL PROTECTED]> wrote:
> Given that you're working on Windows, the easiest way to accomplish your
> goal is to set up multiple versions of InstantRails. You can install the
> appropriate version of gems in each. Just copy your app into whichever copy
> of
On Nov 22, 8:05 pm, RichardOnRails
<[EMAIL PROTECTED]> wrote:
> Hi again,
>
> Wow, that's pretty neat. Of course, it's not quite as nice that I
> thought Rails offered with the line in config/environment.rb, namely
> overriding "RAILS_GEM_VERSION = '2.2.0' unless defined?
> RAILS_GEM_VERSION"
Hi Bill,
Thanks for your response.
> The problem with specifying different version of Rails prior to v2.0 ...
Interesting. But that sounds like what I was trying should have
worked because I was trying to switch from 2.2.x to 2.0.2. Does the
fact that I've got 1.x RubyGems installed impact wh
Hi again,
Wow, that's pretty neat. Of course, it's not quite as nice that I
thought Rails offered with the line in config/environment.rb, namely
overriding "RAILS_GEM_VERSION = '2.2.0' unless defined?
RAILS_GEM_VERSION" somehow.
I'm going to hold out for a little while to see if someone can te
I have been trying to find a way to stop a long running action. The
method I have been trying is using an around filter with the
Terminator gem (http://www.lindsaar.net/2008/9/11/terminator-timeout-
without-mercy) however the Terminator gem doesn't seem to play well
with mongrel. testing it in
Ok - I found out what it was ... damn Merb!!
do_sqlite3-0.9.7
After I removed this gem (which is a dependency installed by Merb)
everything went back to working right. I reinstalled the gem, and I
get the same error again. So there's something going on between Rails
and this particular gem
Hi, all
Now I am doing "Hotel" website where users can select room and arrival
and leave dates,
and I can put into shopping cart.
So I want to create a search form where users can select dates
such like:
Checkin date
<%= date_select 'checkin_date', params[:checkin_date] %>
But it doesn't wok..
Hello,
I have the following scenario:
class User; has_and_belongs_to_many :roles; end
class Role; has_and_belongs_to_many :users; end
#roles schema only has name (string) as attribute
an additional table 'roles_users' with user_id (integer) and role_id
(integer) was necessary.
Then I created a fi
sorry for the soliloquy.
this is the solution:
<%= select_month(Date.today, :prefix => 'month_select', :field_name =>
'') %>
prefix is the right option -> params[:month_select]
the field_name option is an extension befor the name ->
if you select the november as month the value is field_name +
Andi Geheim wrote:
>
>> Check your logs to see under what name the parameter arrives (or look
>> at the rendered html)
>
> Where are those logfiles? in the rendered html it is correct i think:
> name="date[month_select]"
Ah okay i know what logfile you mean :)
this is from this log:
"date"=
> Check your logs to see under what name the parameter arrives (or look
> at the rendered html)
Where are those logfiles? in the rendered html it is correct i think:
name="date[month_select]"
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You
On Nov 22, 3:30 pm, Andi Geheim <[EMAIL PROTECTED]>
wrote:
> hi
>
> thanks for the answer!
>
> this is not the problem. The notice will be shown up on the index.
>
> The problem is that the post is empty. If i exchange the select_month
> with select_date the post work out.
Check your logs to se
Hi, it works fine witn ruby 2.x?? I'm very interested.
I read the it doesn´t work with this version, see this comments:
http://agilewebdevelopment.com/plugins/acts_as_commentable
and I´m using rails 2.0.2
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~-
Hi Richard,
RichardOnRails wrote:
> I’ve got a few versions or Rails installed and I'd like
> to run an App I’m developing with various versions
> of Rails. I heard of two ways to switch the version
> of Rails that an app uses:
Given that you're working on Windows, the easiest way to accomplis
hi
thanks for the answer!
this is not the problem. The notice will be shown up on the index.
The problem is that the post is empty. If i exchange the select_month
with select_date the post work out.
for example:
I choose the date: 22.11.2008 the result is: month11day22year2008 (i am
not sur
The redirect should be the last statement.
On 11/22/08, Andi Geheim <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> why is that not working?
>
>
> Controller-
>
> def bla
>
> month = params[:month_select]
>
> redirect_to :action => "index"
>
For a live clock it doesn't matter if it's PHP/JS or Rails/JS. If you
know working example with PHP/JS then it will work with Rails/JS. Live
clock is just JS script and the only thing it depends on is browser
implementation. Maybe you just have some archaic browser?
On Nov 22, 1:52 am, The Neuroc
On Nov 22, 2:57 pm, Erik Lindblad <[EMAIL PROTECTED]> wrote:
> Hi all
>
> When one sends for example a POST request with an XML body Rails
> parses this into a hash with a corresponding structure. How is this
> conversion done and where? Which XML library is used? Any pointers on
> where in the
On Nov 22, 11:56 am, "Greg Hauptmann" <[EMAIL PROTECTED]>
wrote:
> ok, re "I'm just trying to load a set of options which doesn't require
> tables (i.e. using tableless plugin)" I've got the View working now,
> however when I submit back I have an error as Rails tries to populate
> the associati
Hi all
When one sends for example a POST request with an XML body Rails
parses this into a hash with a corresponding structure. How is this
conversion done and where? Which XML library is used? Any pointers on
where in the Rails source this is done would be helpful.
Kindest regards
Erik
--~--~-
On Nov 22, 10:10 am, Schalk Neethling <[EMAIL PROTECTED]>
wrote:
> Hi All,
>
> I found the following discussion on the group:
>
> I now see this is a deprecated and now removed attribute. However, what
> I was wondering, isn't running rake rails:update supposed to fix these
> issues. From Aptana
You can also try using RrailRoad (http://railroad.rubyforge.org/). I
find it pretty simple and neat. Note: It does not pick belongs_to
relationships and uses the has_many from the other direction for
figuring out relationships.
--~--~-~--~~~---~--~~
You received thi
On Nov 22, 2:27 pm, Schalk Neethling <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I believe I have upgraded my Rails version from 2.0.2 to 2.2.2 ;)
> However, I am experiencing some problems with an app that was built on
> 2.0.2. Can anyone suggest a resource where I can learn more about how to
> p
On Nov 22, 12:02 am, Joe Blow <[EMAIL PROTECTED]>
wrote:
> How does page.update actually work? I know its a wrapper for
> Prototype.update but how does it get the partial in there?
>
> Say I wanted to update a div with the contents of a partial manually
> like this.
>
> content = render(:partial =
On Nov 22, 2:31 pm, Fernando Perez <[EMAIL PROTECTED]>
wrote:
> Frederick Cheung wrote:
> > that line needs to be changed to buffer << message
>
> > Fred
>
> Smashing it works! Thanks Fred. How did you know about that? Do you
> often dive into Rails source code?
Well if you look at the original
Faenglir:testapp nicholas$ script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with developm
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.1
- RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-
darwin9.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/b
Hi,
Even if you have mysql installed you will need to get the mysql
adapter written in C for rails. By default, rails ships with the
adapter written in ruby. To do this , just execute ' gem install mysql
'.
Now, for your rails application to use mysql db instead of the default
sqlite3, use the
Frederick Cheung wrote:
> On 22 Nov 2008, at 13:51, Fernando Perez wrote:
>
>> message = (message || (block && block.call) || progname).to_s
>> # If a newline is necessary then create a new message ending with
>> a newline.
>> # Ensures that the original message is not mutated.
>>
Hey all,
I believe I have upgraded my Rails version from 2.0.2 to 2.2.2 ;)
However, I am experiencing some problems with an app that was built on
2.0.2. Can anyone suggest a resource where I can learn more about how to
properly upgrade from 2.0.2 to 2.2.2
I have read some of the what has chan
On Sat, Nov 22, 2008 at 10:26 AM, Jeffrey Pearson <[EMAIL PROTECTED]
> wrote:
> 1) Figure out the dates
> 2) Display them on the web page. I dont want this stored in the db so
> I dont want to add it to my model.
I had this same problem.
Try something like this:
Create a file in config/initial
On 22 Nov 2008, at 13:51, Fernando Perez wrote:
>
> I just wanted to let you know that the hack to make rawk work on Rails
> 2.2.2 by grouping action calls no longer works.
>
> This is the hack, I have put the TODO where the line crashes Rails:
> --
> module ActiveSupport
> class BufferedLogger
On 21 Nov 2008, at 23:26, Jeffrey Pearson wrote:
>
> On the front page, I need to display the schedule of activities for
> the current week. I am having issues figuring out how to get the dates
> for the current week (with two seperate definitions: the first is
> Sunday through Saturday, the othe
I just wanted to let you know that the hack to make rawk work on Rails
2.2.2 by grouping action calls no longer works.
This is the hack, I have put the TODO where the line crashes Rails:
--
module ActiveSupport
class BufferedLogger
def add(severity, message = nil, progname = nil, &block)
I've updated to the Rails 2.2 gem and now I can't run Rails because I
get an error it cannot find SQLite3. I was running just fine under
2.1.2 with SQlite3. I'm on a Mac OS X 10.5 (Leopard) system.
> gem list rails
rails (2.2.2, 2.1.2, 2.0.2)
rails-app-installer (0.2.0)
> gem list sqlite
sqli
On 22 Nov 2008, at 11:57, snitko wrote:
>
> Here's the thing. I'm designing an application that is very likely to
> generate lots of db entries quickly, therefore it's important to think
> about scalability before doing any moves.
>
> To make it more clear: the model would be called 'Item' and i
On 21 Nov 2008, at 19:22, Rick wrote:
>
> Greg,
>
> validates_inclusion_of is looking for :in to be an enumeration. In a
> simple case (one day granularity) you're asking for a list that's
> 365.25 * 200 => 73050 items long.
>
ranges are enumerable and ruby is smart enough to keep it as a range
On Nov 22, 7:26 am, Richard <[EMAIL PROTECTED]> wrote:
>
> Why could this be?? I have opened up the permissions so all can access
> these, I have even tried it at 777 but I get the same results.
>
> If I add dummy pids to the directory it notices they are there and
> gives me errors on start up
Managed to figure this one out not a full half hour after making the
post. Solution in the Gist.
On Nov 21, 11:13 pm, Gerhard <[EMAIL PROTECTED]> wrote:
> I have a Company which has_many AddressLinkings as AddressLinkable
> (polymorphic). The same Company has_many Addresses through
> AddressLinki
I installed ruby186-26
and then run this three command in command line
gem update --system
gem install rails
gem install mongrel
Now i nedd to install mysql and i wish to working with mysql.
but my database.ymal have this kind of think
database.yml
# SQLite version 3.x
# gem install sqli
The thread about the dates got me kicking myself for not posting to
ask. The website I manage for my kids school that WAS running on php/
joomla got hacked and defaced.so I am taking the opportunity to
learn RonR to set up a new site for them.
On the front page, I need to display the sch
In terminal do gem list | grep passenger
On Nov 21, 8:46 pm, Dan Paul <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Sry if this sounds stupid, but how do I check to see what version of
> phussion passenger I am running, I did a recent upgrade and want to
> make sure the new version is in use. Thanks.
I am starting my mongrel processes with
mongrel_rails cluster::start
or
sudo mongrel_rails cluster::start
starting port 8000
starting port 8001
starting port 8002
starting port 8003
and they appear to have started, but they haven't
mongrel_rails cluster::status
gives me
missing pid_file: /
I have a Company which has_many AddressLinkings as AddressLinkable
(polymorphic). The same Company has_many Addresses through
AddressLinkings. When creating a new Company and defining some
Addresses for it, I want to validate the Addresses as well before
saving anything to the database. The issue
Monit: http://mmonit.com/monit/ for all your system process monitoring needs
Munin: http://munin.projects.linpro.no/ because people always love
pretty graphs!
New Relic: http://www.newrelic.com/ Nothing gives you more detail
about how your application is performing in the wild.
Those three will
Hey everyone,
I have a question to all those who use Rails in a professional way and have
to monitor their applications: What values do you monitor? And how?
I don't mean the health values of the machines or the network. I mean just
the Rails applications. I would think of number of logged in use
Here's the thing. I'm designing an application that is very likely to
generate lots of db entries quickly, therefore it's important to think
about scalability before doing any moves.
To make it more clear: the model would be called 'Item' and it will
hold a serial number and some info about it. M
ok, re "I'm just trying to load a set of options which doesn't require
tables (i.e. using tableless plugin)" I've got the View working now,
however when I submit back I have an error as Rails tries to populate
the association models. Any ideas - it's like the parameter
array/hash structure comin
I always get the following problem:
Loading development environment (Rails 2.2.2) >> p = Frontpage.find 1
=> #
>> p.tag_list.add "1" => ["1"]
>> p.save NoMethodError: undefined method
`find_or_create_with_like_by_name' for # from /
Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_
Greg - you might take a look at time_with_zone.rb in ActiveSupport -
I'm looking at 2.2.0 but I know it's in 2.1.2 as well.
a = Time.now
a.is_a?(Time) => true
a = "My name is Fred"
a.is_a?(Time) => false
Maybe closer to what you need?
Rick
On Nov 22, 1:04 am, Rick <[EMAIL PROTECTED]> wrote:
>
Right, but back to your initial question, I don't think my initial
answer was even close to the mark.
I believe the problem you're having is that the validates_inclusion is
looking for an enumeration hanging off the :in. i.e. [1,2,3,4,5] or
1..5 will work but (My Name Is Frank)..(Your Name Is L
Having some problem with sending email with attachment:
I am able to send an email without attachment via gmail server.
However, when i tried to send an image attachment, it is corrupted at
the recipient mailbox; coz the mail received:
(1) Has the attachment, but not able to open the image fil
Hi
why is that not working?
Controller-
def bla
month = params[:month_select]
redirect_to :action => "index"
flash[:error_messages_for] = month.to_s
end
View--
<
Hi All,
I found the following discussion on the group:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/ba1942467c19ea41/7b0a6ae9e87e8d49?hide_quotes=no
I now see this is a deprecated and now removed attribute. However, what
I was wondering, isn't running rake rails:update s
Hey all,
I just upgraded a very simple rails based website from Rails 2.0.2 to
2.2.2. When I started up Mongrel however, I got the following error:
** Starting Rails with development environment...
ExitingC:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:530:in
`send'
82 matches
Mail list logo