I will be out of the office starting 23/12/2010 and will not return until
04/01/2011.
Please contact Adam Brand as my delegate or if urgent a message can be
left on 0439 467 971
Unless otherwise stated, this email is confidential. If received in error,
please delete and inform the sender
On 22 December 2010 22:18, Brian Wolk li...@ruby-forum.com wrote:
Thanks for the replies, everyone.
I tried what Water suggested:
$ rake rails:freeze:edge RELEASE=2.3.5
I don't think you want the edge.
If you want to freeze to the version of rails that the app is
currently using then just
On Dec 22, 2010, at 6:05 PM, Marnen Laibow-Koser wrote:
Please quote when replying.
Matteo Latini wrote in post #969994:
On Dec 21, 2010, at 10:03 PM, Marnen Laibow-Koser wrote:
What do you exactly mean by dynamic...
By dynamic JavaScript, I mean JavaScript generated on the fly with
On 23 December 2010 03:17, daze dmonopol...@gmail.com wrote:
Here's my issue: running ruby -I test test/unit/something_test.rb for
each of my unit tests works perfectly.
However, running rake test:units brings errors in all of them - some
object becomes nil for some reason.
Why might this be
Hi everyone,
I hope someone can help me solve this problem.
I have a model called Project with :has_many = :tasks. In the new
Project form i allow the creation of 1 to n tasks on the fly thanks to
accepts_nested_attributes_for, where the task model has some validations
that block the creation of
Hello all,
WiceGrid version 0.6 for Rails 2 and 3.0.0.pre1 for Rails 3 are
released.
WiceGrid is a Rails grid plugin.
A more detailed blog post: http://leikind.org/2010/12/23/better-late-than-never
Examples online: http://grid.leikind.org/
Source code Rails 2:
Solution:
$ cd /usr/lib/ruby/gems/1.8/gems/rails-3.0.3/
$ ls .
bin
if you have only bin directory:
$ sudo mkdir lib
$ sudo gem install rails
Sebastian
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
Hi
Your code is missing something. Try this one
require test/unit
require rubygems
require selenium
class MyTestClass Test::Unit::TestCase
def setup
@verification_errors = []
@selenium = Selenium::Client::Driver.new(
localhost,
,
Hi
I am using ruby with selenium to automate my test. But when I execute
my test case in eclipse IDE I am getting the following error
internal:lib/rubygems/custom_require:29:in `require': no such file to
load -- test1 (LoadError)
from internal:lib/rubygems/custom_require:29:in `require'
Hello,
I am looking to create a rails app that will model and display
related nodes. I am just beginning to dive into active record and I
was wondering if the following pesudo code would work?
class NodeLink ActiveRecord::Base
belongs_to :node # foreign key - node_id (recorded as
I think you should add the following line in your gem file:
gem rails3-generators
It is required to add your required generators
UP4B LLC
http://up4b.com
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
Hi,
I am new to ruby on rails.. i have one dought in select tag
i created table name with products(id,title,price,date)
I loaded all title name from mysql databse.but if i select any
title means the corresponding price should be display
what can i do for that..plz help me..
--
You received
I am using this function below which updates a div element with a
partial in an ajax call.
def publish
render :update do |page|
page.replace_html 'my_div', :partial = 'my_partial'
end
end
Does this approach breaks the MVC separation. If Yes, how can we avoid
it?
Thanks
Deepak Kumar
On Thu, Dec 23, 2010 at 12:02 PM, Saravanan Ravi saravanaar...@gmail.comwrote:
Hi,
I am new to ruby on rails.. i have one dought in select tag
i created table name with products(id,title,price,date)
Your question is not clear.
What do you mean by
I loaded all title name from mysql
I see 2 things that might help you. On one hand you could use
accepts_nested_attributes_for in your person model and fields_for in
your view, then you would only need to save the person and that would
take care of the client as well but based on what I see in your code
that might not be feasible.
I am trying to implement HMT for the first time and having a ton of
trouble. I would like to be able to have the user check a checkbox
and fill some extra fields for data input. I have tried so many
iterations borrowed from different places I found on the web, none
seem to work quite right.
Hello Rail!
I would use this method:
- check RVM, set all thing you need, see also this part
http://rvm.beginrescueend.com/gemsets/basics/
- is sqlite installed? is it running?
- check if needed Ruby version installed and if you can switch,
- gem version you need,
- particular gem you need - this
Hi,
- first check MySQL console,
- then 'gem list m' - you can see here every gem listed starts with
letter 'm' (or simply 'gem list')
- then what other wrote here 'irb -r active_record'.
If your Euby, Gem, Rails installed well, you have the necessary gems
(see in gem list), then you can edit
Hello,
check RVM because later you can have more problems
http://rvm.beginrescueend.com/gemsets/basics/
I had the same problem, and met with this many times in mailing list.
Better to avoid in early stage.
Cheers,
gezope
On dec. 22, 21:44, Dan W. li...@ruby-forum.com wrote:
Solved!
Matteo Latini wrote in post #970246:
On Dec 22, 2010, at 6:05 PM, Marnen Laibow-Koser wrote:
really doesn't belong. You wouldn't do that in Ruby; don't do it in JS.
Ruby is actually NOT like that... Actually everything we love about
rails
is thanks to dynamic code...
That's not true at
I'm trying out Rails 3 with MongoMapper for a new application, and have
run into a bug when both MongoMapper::Document and
ActiveModel::Validations are used in the same model, in this case
job.rb. I can create a new model with the various validations I require,
but when I attempt to save it I get:
zoltan,
thanks for help. i solved the problem by doing the following:
rvm notes
returns a list of modules that needed to be installed on linux. after
that i
gem install sqlite3-ruby
and everything worked fine.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
This is a full time, on-site, salaried Junior Open Source Developer
position located in Greenwich, CT paying $55,000 to $65,000 depending
on experience + benefits. No telecommuting allowed. US Citizens or
Green Card holders only please. Local candidates only. Thank you.
Our boutique hedge
On Dec 22, 10:38 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Let's see your error messages. But why the heck are you defining an
object like this anyway? What are you trying to achieve?
I'm trying to get a test for acts_as_list working. I've defined a
method in test_helper that I
On Dec 22, 11:12 am, Mike Porter li...@ruby-forum.com wrote:
Hi,
We are looking for a calendar scheduling solution that supports
recurring events.
I haven't used it, but when I was filling idle time a little bit ago
the one I found that I liked the best was:
daze wrote in post #970337:
On Dec 22, 10:38pm, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Let's see your error messages. But why the heck are you defining an
object like this anyway? What are you trying to achieve?
I'm trying to get a test for acts_as_list working. I've defined a
Hi all,
I'm new to Rails and new to Rails testing. I have a few questions:
First, the most important question. How do I get line numbers to be
reported with my errors when testing. Here is what I get back on a
typical error:
j...@josh-laptop:~/d/test$ ruby unit/line_test.rb -n test_update
Joshua S. wrote in post #970342:
Hi all,
I'm new to Rails and new to Rails testing. I have a few questions:
First, the most important question. How do I get line numbers to be
reported with my errors when testing.
soapbox
Probably by not using Test::Unit. :) It sucks. Try RSpec instead.
Or just change the way you calculate to get at the level of accuracy
that you want/need:
irb (291.15.to_f * 1000.0).to_i/10
= 29115
Jeff
On Dec 22, 7:41 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote:
TomRossi7 wrote in post #970207:
Any idea why this calculates the integer the way it
Please quote when replying.
Jeff Burlysystems wrote in post #970344:
Or just change the way you calculate to get at the level of accuracy
that you want/need:
irb (291.15.to_f * 1000.0).to_i/10
= 29115
That's incredibly silly IMHO. Besides, it will not always be the same
for all values,
I have currency information that I plan to store as an integer --
ironically to avoid issues like this. The user input will always be
in a decimal form. I'm thinking I will just do this ('291.15'.to_f *
100).round instead. That should round out any of the weird float
issues.
On Dec 23, 12:51
I posted an unpleasant solution on stackoverflow:
http://stackoverflow.com/questions/4521203/ruby-tests-error-messages-dont-include-line-numbers-or-file-name/4521275#4521275
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
Please quote when replying.
TomRossi7 wrote in post #970346:
I have currency information that I plan to store as an integer --
ironically to avoid issues like this. The user input will always be
in a decimal form. I'm thinking I will just do this ('291.15'.to_f *
100).round instead. That
Oh whoa okay thanks. I better make some changes now... :/
Can I use Shoulda w/ Rspec, or do I just use one over the other?
And I should use this one https://github.com/rspec/rspec-rails, right?
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
Please quote when replying.
daze wrote in post #970358:
Oh whoa okay thanks. I better make some changes now... :/
Can I use Shoulda w/ Rspec, or do I just use one over the other?
I understand Shoulda is usable with RSpec. I've never actually used
Shoulda on any of my projects, though.
On Dec 22, 10:34 pm, TomRossi7 t...@themolehill.com wrote:
Any idea why this calculates the integer the way it does?
irb (291.15.to_f * 100.0).to_i
= 29114
As Marnen's already pointed out, the issue is that the result is a
*tiny* bit smaller than 29115, so to_i truncates off the entire
On Dec 23, 12:00 pm, ppgeng...@prevailhs.com ppgeng...@gmail.com
wrote:
On Dec 22, 11:12 am, Mike Porter li...@ruby-forum.com wrote:
Hi,
We are looking for a calendar scheduling solution that supports
recurring events.
I haven't used it, but when I was filling idle time a little bit
Thanks for reply pepe.
You say to use a transaction... I already am using a transaction!
The issue is that if the person save succeeds and the client save
fails then the transaction is rolled back fine. However the person
record now has a person.id and subsequent code assumes that the record
is
Hi I am trying to update a blob column from Ruby script into MySQL DB.
The script is running on PC and DB on Linux host.
The problem I see is that only 255 bytes of data being stored ,
is there any way to deal with that problem ?
myconnect = Mysql::new(host, user, , db)
f =
On Dec 22, 10:36 am, Hitesh Rawal li...@ruby-forum.com wrote:
Hi,
I am using devise 1.0.8, and I want to restrict concurrent login of user
i.e. same user should not be login from different browser or different
location if he already login from some where.
and if he really wants to login
On 23 December 2010 17:40, Joshua S. li...@ruby-forum.com wrote:
Hi all,
I'm new to Rails and new to Rails testing. I have a few questions:
First, the most important question. How do I get line numbers to be
reported with my errors when testing. Here is what I get back on a
typical error:
TomRossi7 wrote in post #970346:
I have currency information that I plan to store as an integer --
ironically to avoid issues like this. The user input will always be
in a decimal form. I'm thinking I will just do this ('291.15'.to_f *
100).round instead. That should round out any of the
You say to use a transaction... I already am using a transaction!
Sorry about that. I obviously didn't read carefully your post.
The issue is that if the person save succeeds and the client save
fails then the transaction is rolled back fine. However the person
record now has a person.id and
On 23 December 2010 03:41, Marnen Laibow-Koser li...@ruby-forum.com wrote:
TomRossi7 wrote in post #970207:
Any idea why this calculates the integer the way it does?
irb (291.15.to_f * 100.0).to_i
= 29114
Because of the vagaries of floating-point arithmetic:
irb (291.15.to_f * 100.0)
Colin Law wrote in post #970376:
On 23 December 2010 03:41, Marnen Laibow-Koser li...@ruby-forum.com
wrote:
29114.9996362021192908287048
It bears repeating: never, ever use Floats for arithmetic. If you can't
use fixed-point math, then use BigDecimal.
I have to disagree here.
I
On 23 December 2010 21:34, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Colin Law wrote in post #970376:
On 23 December 2010 03:41, Marnen Laibow-Koser li...@ruby-forum.com
wrote:
29114.9996362021192908287048
It bears repeating: never, ever use Floats for arithmetic. If you can't
Would this not be the proper solution ?
User has many payments. I want the user to have at
least one payment with an amount, before a user is
valid.
class User ActiveRecord::Base
default_scope :order = :id
has_many :payments
validate :has_one_complete_payment
private
def
On 23/12/10 10:32, Serafino Picozzi wrote:
Hi everyone,
I hope someone can help me solve this problem.
I have a model called Project with :has_many = :tasks. In the new
Project form i allow the creation of 1 to n tasks on the fly thanks to
accepts_nested_attributes_for, where the task model
Hi,
My application is running over ubuntu 10, ruby 1.9.2, rails 3.0.3 and
passenger 3.0.2 + nginx.
This application has several polymorphic associations and the problem
is that when the associations are called it randomly returns either
the related object or an ActiveRecord::Relation object.
Hey guys,
I am trying to set up a logging server using log4r !
When I try to run the server I get the following error message
LogServer not supported. ROMP is required (RuntimeError)
I installed romp the way its mentioned in some blog with similar
issue. Any ideas about it ?
Thanks.
--
You
Hello,
I'd like to know how to update a foreign key in an association table
(many_to_many association) ?
Here is my model, Split is the association table between Account and
Transaction:
class Account ActiveRecord::Base
set_primary_key :guid
has_many :splits, :foreign_key =
On Dec 23, 8:51 pm, Roman Mandeleil li...@ruby-forum.com wrote:
Hi I am trying to update a blob column from Ruby script into MySQL DB.
The script is running on PC and DB on Linux host.
The problem I see is that only 255 bytes of data being stored ,
is there any way to deal with that problem
Marnen Laibow-Koser wrote in post #970178:
Peter Vandenabeele wrote in post #970143:
[...]
Thanks for that hint. It lead me to this page:
http://rvm.beginrescueend.com/gemsets/basics/
You hadn't read that before?
No. I am fairly new to rvm. Figured out
$ rvm gemset help
as a useful
Marnen Laibow-Koser wrote in post #970377:
Then use fixed-point math. IEEE floats are 100% inappropriate for any
sort of mathematical calculation. And who cares how fast they are if
they're inaccurate? Inaccurate engineering calculations are worse than
none at all -- do *you* want to drive
tinyblob
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
Paul Bergstrom wrote in post #970168:
And so have I. But as I said. I'm not a natural programmer. But I try to
be a software developer and I think Rails is much easier to use than e g
php. Hopefully it will stay that way.
Actually that should be web developer. A bit tired when I wrote that
David Kahn wrote in post #970173:
Well said. :-)
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this
Robert Walker wrote in post #970390:
Marnen Laibow-Koser wrote in post #970377:
Then use fixed-point math. IEEE floats are 100% inappropriate for any
sort of mathematical calculation. And who cares how fast they are if
they're inaccurate? Inaccurate engineering calculations are worse than
Please quote when replying.
Roman Mandeleil wrote in post #970391:
tinyblob
Well, there's your problem -- a MySQL TINYBLOB only holds 255 bytes of
data!
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
Sent from my iPhone
--
Posted via http://www.ruby-forum.com/.
--
Greetings,
I asked this over at the Spree google group but got no response. I'm
hoping someone here might have experience with this.
I am implementing a drag and drop cart with Rails 3 and jQuery. This
cart works outside of Spree.
The URL I call from the drop action is hardcoded as
Yep I got it. So much trouble with the script so I missed the obvious.
But, I still don't understand why the place holder for the update
statement doesn't work: I mean that syntax:
update_sql = update SHARE set COMPANY_LOGO = ? WHERE ID =
8982167534873685924;
stmt = myconnect.prepare(update_sql)
61 matches
Mail list logo