I have tried small ruby program like
require 'rubygems'
require 'postgres'
db = PGconn.connect('localhost', 5432, '', '', 'prdjnj','postgres',
'postgres')
res=db.exec("select * from users limit 30")
res.clear
puts "After clear result object"
a=1
while a!=2
end
Before running this program,Init
I am testing for the existence of records on a database. If I use:
Mapper.exists?(product.id)
How do I test if the condition returned was true or false?
Thanks in advance.
Paul Thompson
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
These are the routes I would like:
map.forums_new_topic 'forums/:forum_id/:subsection_id/topics/
new', :controller => "topics", :action => "new"
map.forums_show_topic
'forums/:forum_id/:subsection_id/:topic_id', :controller =>
"topics", :action => "show"
however no matter which order they're i
I copied and pasted and ran this code and it worked fine for me. Any
stray "," characters?
On May 16, 6:50 pm, Orient Fang wrote:
> HI,
> I have almost the same issue when I follow the 3rd Edtion.
> but I verified the every type characters, there should be no mistakes.
> Any one could help?
> ---
The problem is that the function crud_views_as_a_string is not defined
(GenModCRUD.rb:22:` def crud_views_as_a_string') to take an argument.
But in your test you are calling it with an argument :string
(TestGMC.rb:12: `crud_views_as_a_string(:string)'
I'm not sure what you're testing, but to simpl
clanlaw wrote:
> On 17 May 2010 02:50, Orient Fang wrote:
>> cart.rb file as following,
>> � � � �else
>> � � � �...@items << CartItem.new(product)
>> � � � �end
>> � �end
>> end
>> --
>
> Are you absolutely certain that is the right cart.rb? Is that the
> complete file? It looks ok to me.
the example i'm making uses state_machine because it's part of my
current setup but this isnt a state_machine specific problem.
i have a model called Station. it's an abstract concept for "an area
in which work is performed"... when i'm using the app the Stations
could be anything from "simulation
Jason Michael wrote:
> Colin,
>
> You're right! But I can't go down that path right now. In the future
> I'll
> refactor the heck out of tis rats nest, but for now I have to make it
> work.
>
> Jason
If it's a "rats nest", it will probably be faster to refactor than to
try to maintain it a
Hi all,
SideReel is looking for a talented Ruby on Rails developer to join our
engineering team in San Francisco. If you haven't used SideReel
before, our mission is to give users the power to track and watch any
show online. We are a small established start-up located on the top
floor of an old b
Mea Culpa: I thought you were talking about Rails' scaffolding. I
didn't realize Active Scaffolding was "Scaffolding on Steroids" :-)
Thanks for suggesting it again.
Regular scaffolding didn't work out as simply as I naively thought,
i.e. I couldn't just invoke with a list of a dozen fields and
RichardOnRails wrote:
> Hi paving,
>
> Thanks very much for your response to my complaint about lack of Rails
> support for handling changes.
>
> Bottom line: I think you've shown that the approach I wished Rail's
> offered is, in fact, at hand. I'll try it today!!
>
>> What you keep talking a
Colin,
You're right! But I can't go down that path right now. In the future I'll
refactor the heck out of tis rats nest, but for now I have to make it work.
Jason
On Mon, May 17, 2010 at 4:20 PM, Colin Law wrote:
> On 17 May 2010 02:20, chewmanfoo wrote:
> > I have a hosts class with an ip
On 17 May 2010 02:20, chewmanfoo wrote:
> I have a hosts class with an ip_addresses class which has a host_id
> attribute. All hosts are associated with a data_center, and all
> ip_addresses are associated with a network. Networks have a standard
> IP network definition (192.168.59.0/24) etc. W
On 17 May 2010 10:38, neckie wrote:
> Hi all,
> Im a new user for using Rails,
> I got the 3 error msg as belows,
>...
> rake_test_loader
> Started
> F.F.F...
Hi,
did you also define your gem in your application environment?
Look into environment.rb in config dir.
Then define:
config.gem 'nameofgem', 'some options if needed'
then rake gems:install
and restart your server.
Greetings Greg
Am 17.05.2010 um 20:51 schrieb Rahul Chaudhari:
> Hi All,
>
> I a
On 17 May 2010 02:50, Orient Fang wrote:
>
> HI,
> I have almost the same issue when I follow the 3rd Edtion.
> but I verified the every type characters, there should be no mistakes.
> Any one could help?
> -
> SyntaxError in StoreController#add_to_cart
> D:/InstantRails/rails_apps/lzpback
On May 17, 2:48 pm, Mike Disuza wrote:
> Hi,
> I have written following code:-
> It is working fine for http protocol. But whenever I am doing for https
> I getting an error "end of file reached".
> Can anyone tell me what is wrong with the code?
>
Doesn't look like post_form handles https at al
Hi!
Thanks for the answer.
I've been reading, and I think this is just want I need.
Thanks again.
On May 17, 6:27 pm, Frederick Cheung
wrote:
> On May 17, 3:24 pm, saptah wrote:
>
> > Hi guys,
> > I'm new with RoR, and so far I'm loving it.
> > I got a question: ¿How is the most efficient way t
No response? Is anyone using HttpMock?
Thanks,
Tom
On May 15, 4:32 pm, TomRossi7 wrote:
> A little more information: the problem is once you require
> 'active_resource/http_mock' all subsequent tests will assume http
> mocks exists. This makes it so I can't run my tests with rake.
>
> On May 1
David Zhu wrote:
> > The guys at the searchlogic google groups seem to be asleep -.-
>
> > They didnt' grant me permission to post yet.
>
> > But anyways, right now, I followed the searchlogic tutorial found here
> > -http://www.binarylogic.com/2008/09/07/tutorial-pagination-ordering-
> > and-sea
Hi All,
I am facing problem in installing gem for my application.
I installed all application dependent gem using rake gems:install but
still it showing some gem are missing ever if I installed gem
manually(sudo gem install gemname).
Gem is installed and is show by gem list command.
I tried my
Hi paving,
Thanks very much for your response to my complaint about lack of Rails
support for handling changes.
Bottom line: I think you've shown that the approach I wished Rail's
offered is, in fact, at hand. I'll try it today!!
> What you keep talking about wanting to do is impractical for a
Adam Akhtar-2 wrote:
>
>
> I had this same issue so in the interest of shortening someone else's
> search I thought I'd document it a little more.
>
> The problem I was having (and I assume pepe) was that the OCI8::Cursor
> interface has changed between 1.0.x and 2.0.x. The rails oracle sup
OK guys,
All problems solved.
As you suspected, no doubt, all problems were my errors. But I lacked
faith in Unit Tests so I failed to diligently investigate how reported
errors may be caused by defects in my code.
But after posting the code for a second time, I started to notice
some strange
Don't think that I have written off html_safe as worthless as I think
you might have. I see its value of course. I'm not sitting here being
cocky either. Lets just say that I've found using html_safe so far to
be tricky, even it it does force me to be clear at every stage what
may or may not be har
thanks!
On May 17, 6:54 pm, Marnen Laibow-Koser wrote:
> Luma wrote:
> > "not working" means there's nothing happening:
>
> > u...@ubuntu:~/project/src$ ./script/plugin install
> >http://github.com/adzap/validates_timeliness.git
> > u...@ubuntu:~/project/src$
>
> You need to install a Git clien
badnaam wrote:
> The time gets stored just fine (though in 24 hour format, which is
> another headache)
Time is effectively meaningless without the date part. You say you want
to validate times like 7 pm to 9 pm. Does that mean 7-9 pm standard time
or daylight time? Without the date you can't kn
pode ser brasileira também ???
2010/5/15 Matias Reyes
> No soy del área informática por lo que me ha costado entender Rails
> (Se html, css y php (nivel básico) )
> Estoy buscando a alguien de Santiago, Chile que esté interesado en
> capacitarme (pagado por su puesto)
>
> Gracias
>
> --
> You re
> It's not an "extension" that's it's name. The file lives in your home
> folder.
>
> From a terminal prompt:
>
> vi ~/.bashrc
>
> or if you prefer gui:
>
> gedit ~/.bashrc
Thanks for the quick reply.
I've one more question for you...
Apache + Mongrel
You have to start Mongrel Cluster
I'm trying to create the most simple Rails wrapper for Warden I can for
my own learning experience. Warden's maintainer also has rails_warden,
but I'd like to simplify that even further.
(http://github.com/hassox/rails_warden)
I currently have a warden.rb initializer with the following:
Rails
Thanks Frederick.
If I do that, it stores the date of the day the record was updated or
created, I would still need to extract just the time portion and
compare it. Is there a way to do that?
My use case is that on May 1st, customer makes reservation beween
7-9pm for May 5th. The record is stored
Luma wrote:
> "not working" means there's nothing happening:
>
> u...@ubuntu:~/project/src$ ./script/plugin install
> http://github.com/adzap/validates_timeliness.git
> u...@ubuntu:~/project/src$
You need to install a Git client so the plugin installation script can
talk to the respository. I b
the same with
./script/plugin install git://github.com/adzap/validates_timeliness.git
--
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,
On May 16, 2010, at 6:20 PM, chewmanfoo wrote:
> I have a hosts class with an ip_addresses class which has a host_id
> attribute. All hosts are associated with a data_center, and all
> ip_addresses are associated with a network. Networks have a standard
> IP network definition (192.168.59.0/24)
You were right, stupid of me. Thanks
--
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 e
On May 17, 3:24 pm, saptah wrote:
> Hi guys,
> I'm new with RoR, and so far I'm loving it.
> I got a question: ¿How is the most efficient way to insert 1000
> records on the same table?
> I'm trying to insert allot of "items" on the same table, but, right
> now I'm creating an "item" object, wit
"not working" means there's nothing happening:
u...@ubuntu:~/project/src$ ./script/plugin install
http://github.com/adzap/validates_timeliness.git
u...@ubuntu:~/project/src$
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this
I've set script/plugin executable. It seems that plugins from github
can't be installed.
This works on ubuntu and similarly on windows:
./script/plugin install
http://dev.rubyonrails.org/svn/rails/plugins/account_location/
works only on ubuntu:
./script/plugin install svn://rubyforge.org/var/svn
On 17 May 2010 17:06, Peter Hickman wrote:
> Sorry, one last thing.
Without relevant quotations, these posts are just ramblings better
suited to a blog of your own. It doesn't help that they're off topic
of the thread (even though I'd broadly agree with the sentiment).
> Think of it like this, y
Sorry, one last thing.
Yes a developer should question the client's requirements, but to do that
you need to earn their respect.
I can do COBOL so if I say that it would be better to implement things in a
different way the client will consider it because they know that I know what
I am talking ab
Hi guys,
I'm new with RoR, and so far I'm loving it.
I got a question: ¿How is the most efficient way to insert 1000
records on the same table?
I'm trying to insert allot of "items" on the same table, but, right
now I'm creating an "item" object, with the data, and then call
item.save.
¿Is there a
On 17 May 2010 16:31, Peter Hickman wrote:
> My message was in response to this from the OP
Can you please quote when you reply.
We know what your reply to the OP was - we read it; but we don't know
what context this message is in.
Many thanks.
--
You received this message because you are subs
My message was in response to this from the OP
"i hate windows from the bottom of my heart too, and love the Mac"
Quite frankly it is this type of attitude that gets developers a bad name.
ZOMG you have to use windows!!!11!!one!!
The horror.
Although I have never been a plumber I have been a c
On 17 May 2010 16:23, Raghu Maddali wrote:
> Can anyone help me saying where do I find the file with extension
> .bashrc,and run this step succesfully...
It's not an "extension" that's it's name. The file lives in your home folder.
>From a terminal prompt:
vi ~/.bashrc
or if you prefer gui:
Hi,
I'm a newbie to RoR and have been facing some problem installing RoR on
my system.
I'm following this guide to install RoR
https://help.ubuntu.com/community/RubyOnRails
and stuck up at this step
Installing Rubygems:
To make gem work properly you should write gem's path to PATH add to
~/.b
Rob Lacey wrote:
> I guess its a bit of a whinge as well as to gauge other people's
> opinions on it. Personally I haven't used the 'h' method a great deal
> in the past 4 years of developing with Rails, I guess because our
> validation generally doesn't allow for html being injected into our
> dat
I guess its a bit of a whinge as well as to gauge other people's
opinions on it. Personally I haven't used the 'h' method a great deal
in the past 4 years of developing with Rails, I guess because our
validation generally doesn't allow for html being injected into our
database. But of course its al
Peter Hickman wrote:
> If you intend to become a developer you will need broad shoulders, you
> will
> have to work with tools that you do not like in environments you would
> not
> choose.
>
> "An accounting system in Basic on VMS"
> "Update a COBOL system on a Bull mainframe"
> "Integrate with
Rob Lacey wrote:
> Is it just me or is html_safe a massive pain in the arse? Just trying
> to do a simple helper.
Are you having an actual problem with it, or are you just complaining?
If it's the latter, then I'll inject that it's a heck of a lot less of a
pain than having to remember to wrap e
Minor correction:
View http://www.pastie.org/963750 instead of the "pastie" link I
provided earlier.
My minor error was that the first line of TestGMC.rb was a comment
with the wrong filename. That led me to post incorrect labels in the
"pastie".
I apologize for the sloppiness.
Best wishes,
Ri
I will be out of the office starting 05/14/2010 and will not return until
06/17/2010.
Please feel free to contact the following for assistance.
Clinton F. Miller at 919.442-8380
Scott Rapp at (919) 373-4063
--
You received this message because you are subscribed to the Google Groups "Ruby
I've just found an alternative solution by taking file_column away and
use paperclip instead.
Rafael Oshiro wrote:
> I'm having a problem with file_column running in mongrel in Windows
> 2003. My app runs perfectly but, when I try to upload a picture, this
> message is shown:
>
> c:/ruby/bin/mo
Update attributes just calls attributes=, which just calls the setter
methods corresponding to the args hash keys. Thus, the way to do what
you're looking for is to delete the hash keys you don't want.
But for updating a subrecord instead, you could just call
update_attributes on the subrecord ins
On May 17, 1:42 pm, RichardOnRails
wrote:
> Hi Marnen and Frederick,
>
> Thanks for looking into my problem.
>
> Frederick: I removed the colons from the public and private macros
> Marnen: The code and the output I got from running them is
> athttp://www.pastie.org/963644. It's got line num
Hi,
I have written following code:-
It is working fine for http protocol. But whenever I am doing for https
I getting an error "end of file reached".
Can anyone tell me what is wrong with the code?
def email_to_friend
require 'net/http'
require "net/https"
require 'uri'
#res =
Net::HTT
If you intend to become a developer you will need broad shoulders, you will
have to work with tools that you do not like in environments you would not
choose.
"An accounting system in Basic on VMS"
"Update a COBOL system on a Bull mainframe"
"Integrate with an erlang system talking to MSSQL Server
I set a cookie but otherwise don't really have any variables that
cross. I also have other forms that are even simpler (not even the
cookie) and they blank out as well. I also checked my views, no
variables are the same. Thanks for your help.
class Qcsubmissions::SetupDatabasesController < Appli
Hi All,
I am new to use radiant CMS, I have installed radiant gem and made
one application..And installed blog extension in my application but how
can post the new blog in my application??? I can't find any link to post
the new blog in my application...So is there any more configuration is
req
On ubuntu, try it without sudo. Check that the script/plugin file has
execute bit set. Run
chmod u+x script/plugin
In any case it has nothing to do with the plugin. Have you installed
other plugins this way?
Try using the gem instead.
On May 17, 8:19 pm, Luma wrote:
> I'm trying to install t
Hi Marnen and Frederick,
Thanks for looking into my problem.
Frederick: I removed the colons from the public and private macros
Marnen: The code and the output I got from running them is at
http://www.pastie.org/963644. It's got line numbers. As you
obviously can now see, line 12 is the secon
On Mon, May 17, 2010 at 7:47 AM, Neil Bye wrote:
> Frederick Cheung wrote:
>> On May 16, 6:09�pm, Neil Bye wrote:
>>
>>> Can anybody tell me where the div, that splits submitted from comments,
>>> appears from?
>>
>> What does the post partial & generated html look like ? Could you have
>> forgot
Frederick Cheung wrote:
> On May 16, 6:09�pm, Neil Bye wrote:
>
>> Can anybody tell me where the div, that splits submitted from comments,
>> appears from?
>
> What does the post partial & generated html look like ? Could you have
> forgotten to close a tag or something like that ?
>
> Fred
Hop
radu puspana wrote:
> Hi Peter, thx so so much for your kind and rapid advice. And i hate
> windows from the bottom of my heart too, and love the Mac, but i am
> constrainted to develop under windows, for now.
>
If you are truly constrained by your employer to develop the application
under Windo
On 17 May 2010 12:16, radu puspana wrote:
> Hi Peter, thx so so much for your kind and rapid advice. And i hate
> windows from the bottom of my heart too, and love the Mac, but i am
> constrainted to develop under windows, for now.
If your desktop OS *has* to be Windows, then just install Virtual
Hi Peter, thx so so much for your kind and rapid advice. And i hate
windows from the bottom of my heart too, and love the Mac, but i am
constrainted to develop under windows, for now.
On 17 mai, 14:05, Peter Hickman
wrote:
> There is nothing technical to stop you developing Rails sites under Wind
Hi,
I am working on application in which I need the affilators interaction.
I went through the commission junction which provide us the RESTful API
and send the response. I have the URL
"https://product-search.api.cj.com/v2/product-search?";. I have to do a
call this URL.
My problem is How should I
There is nothing technical to stop you developing Rails sites under Windows,
I would never do this by choice but it is just that. Choice.
However I would never deploy to a Windows production server. I don't trust
Windows as a server environment but this is partly because I lack the skills
and know
1.I'm asking IF IT IS A GOOD IDEA to develop a rails project under
windos, when i could be using linux.
2. can it be done without any limitations forced by the windows OS
On 17 mai, 13:22, ChenJie|抽屉 wrote:
> OK, Let me try to answer your question.
>
> On Mon, May 17, 2010 at 17:34, radu puspana
thx so much for your answer!
But i think u got mw wrong on the first question. I meant :
IS IT A GOOD IDEA to develop a rails project under windos, when i
could be using linux??
2. can it be done without any limitations forced by the windows OS ??
On 17 mai, 13:22, ChenJie|抽屉 wrote:
> OK, Let m
thx so much for your answer! however i have some difficulties with
each of your answers :
On 17 mai, 13:22, ChenJie|抽屉 wrote:
> OK, Let me try to answer your question.
>
> On Mon, May 17, 2010 at 17:34, radu puspana wrote:
> > Hey guys, thx for talking your time to answer this post, i much
> >
OK, Let me try to answer your question.
On Mon, May 17, 2010 at 17:34, radu puspana wrote:
> Hey guys, thx for talking your time to answer this post, i much
> appreciate it.
>
> 1. is dev in rails under windows a great idea.i can think of 1
> reasons, i know, bu i can;t install linux on my
I'm trying to install the validates_timeliness plugin:
on Ubuntu lucid in my rails project directory:
sudo ./script/plugin install git://github.com/adzap/validates_timeliness.git
./script/plugin: command not found
on windows (as admin) in my rails project directory:
ruby script/plugin install git
Hi all,
Im a new user for using Rails,
I got the 3 error msg as belows,
/usr/bin/ruby1.8 -I"lib:test" "/home/mioinst/.gem/ruby/1.8/gems/
rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/
way_controller_test.rb" "test/functional/
diary_entry_controller_test.rb" "test/functional/
amf_contro
On May 16, 6:09 pm, Neil Bye wrote:
> Can anybody tell me where the div, that splits submitted from comments,
> appears from?
What does the post partial & generated html look like ? Could you have
forgotten to close a tag or something like that ?
Fred
>
> Attachments:http://www.ruby-forum.com
Hi
I have setup DNS for 127localhost.com and 127localhost.fr for making
sub-domains and/or locale from the domain name testing easier when you
are on your local machine.
More details here: http://gist.github.com/403002
Seb
---
h
Hey guys, thx for talking your time to answer this post, i much
appreciate it.
1. is dev in rails under windows a great idea.i can think of 1
reasons, i know, bu i can;t install linux on my PC, for now at least.
the compamy that i am working for wants me to install all of the
programs i need t
On May 17, 4:43 am, RichardOnRails
wrote:
> module GMC_mod
> # The standard views (in app.views) in alphabetical order
> # for any DB table
> :private
Not relevant to the problem but this doesn't actually make methods
private (it's just the symbol literal 'private'). Remove the : for it
Anyone has an better solution?
Simply tell me thoughts.It is so hard for me.
Thanks!
--
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...@googlegr
On 16 May 2010 06:21, Albus Dumbledore wrote:
> Well. I am having trouble understanding how acts_as_list works. I do not
> quite comprehend what the table schema for the example given by DHH must
> be:
>
> [code]
>
> class TodoList < ActiveRecord::Base
> has_many :todo_items, :order => "positi
On 17 May 2010 03:30, RichardOnRails
wrote:
>
>
>
> I feel like writing a generator to populate views when
> columns are added/renamed/dropped from a DB table. It annoys my that
> there's no tool to do that.
What you keep talking about wanting to do is impractical for an
automatic procedure.
Co
I have a situation where I only want to update the object, but not the
nested attributes. Is there a way to tell Rails to only call
update_attributes on the main object? I also have a situation where I
only wanted to update certain nested attributes, but not the main
object (i.e. one of the subobje
I have a hosts class with an ip_addresses class which has a host_id
attribute. All hosts are associated with a data_center, and all
ip_addresses are associated with a network. Networks have a standard
IP network definition (192.168.59.0/24) etc. When a user changes that
network definition, I nee
On May 17, 6:29 am, badnaam wrote:
> I am storying a column called start time and endtime, both having
> mysql type "time".
>
[snip]
>
> The time gets stored just fine (though in 24 hour format, which is
> another headache), but when I extract this time to compare it to
> Time.now, to figure o
83 matches
Mail list logo