ftp api itself has binary mode ,but not support writing file which
itself is initially binary data?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk"
Hi there,
I'm trying to follow the ch 22 of the RSpec book.
[ copy is (B11.0 printing, October 28, 2009) ]
I want to use selenium and cucumber.
Ordinary webrat seems to be working well.
Here is info about my RoR:
Sat Nov 07 21:53 /pt/tt11 maco$
Sat Nov 07 21:53 /pt/tt11 maco$
Sat Nov 07 21:5
Net::FTP#putbinaryfile(binary_file, remotefile)
binary_file is not a local file from some directory,but a dynamic
generation from codes.
The above codes not work,how to write it to ftp?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received
I am creating a layout of images with links.
In Photo model:
has_attached_file :mainimg, :styles => {:original =>
"465x365", :thumb => "80x70"}
In my Front controller:
def index
@photos = Photo.find(:all)
@photos = Photo.paginate :per_page => 28, :page => params[:page]
end
my deal is even simpler than this though... The above like makes a
series of models under a parent model.. I just want the series of
parent models...
On Nov 8, 9:38 am, Eric wrote:
> mandatory viewing:http://railscasts.com/episodes/73-complex-forms-part-1
>
> you'll probably benefit from watchin
7H3LaughingMan wrote:
> Haven't really created any "proper" tests since I actually only have
> one controller at the moment and I can test it via browser
Not an excuse. You should write tests before writing any application
code at all. That way you know your code does what you meant it to.
Re
Haven't really created any "proper" tests since I actually only have
one controller at the moment and I can test it via browser. All of my
methods work however whenever I do an update it doesn't touch the set
method to change the variable. (Tested with simple outputing text to
say that it was bein
7H3LaughingMan wrote:
> I don't know how it fails but for some reason it refuses to update
> when I edit it, I have it setup to where it goes back to the index
> when you successfully edit something and when it doesn't work it goes
> back to the edit page. It doesn't even throw any error messages.
Hi,
I'm using RIO (http://rio.rubyforge.org/) in some of my models and
it seems like Rake doesn't like it very much. The two conflict with
each other.
Has anyone figured out how to have RIO work as expected in rake?
Thanks.
-Nash
--~--~-~--~~~---~--~~
Yo
i was using sqlite for the past few projects and getting things
running smoothly enough
recently getting macports, git, installing a git module; geokit
turns out geokit has more functionality in mysql / postgress then
sqlite, namely distancing functions
i create the project as mysql, scaffold a l
I don't know how it fails but for some reason it refuses to update
when I edit it, I have it setup to where it goes back to the index
when you successfully edit something and when it doesn't work it goes
back to the edit page. It doesn't even throw any error messages.
On Nov 7, 3:30 pm, Marnen La
mgpowers wrote:
> Does anyone have any ideas on this ?
>
> I hate to abandon Ruby but the error...
>
> /!\ FAILSAFE /!\ Wed Aug 26 10:40:18 -0400 2009
> Status: 500 Internal Server Error
> unknown error
> C:/Ruby/lib/ruby/1.8/dl/import.rb:29:in `initialize'
> C:/Ruby/lib/ruby/1.8/dl
mandatory viewing: http://railscasts.com/episodes/73-complex-forms-part-1
you'll probably benefit from watching all of them.
-eric
On Nov 7, 3:31 pm, eggie5 wrote:
> I created scaffolding for my Model x, but I want to modify the new
> view so that I can create multiple (3) x objects in the DB
> It's a Ruby thing. Can be tough to get used to
Yep. I understand and definitely agree that it's a bit tough to get
used to. The thing is, when the option to use parens when they're not
required is exercised (as in lines 1 and 3 of this example) and then,
for no apprent reason, the option is
I created scaffolding for my Model x, but I want to modify the new
view so that I can create multiple (3) x objects in the DB instead of
just 1 at a time. How can I do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
On Fri, Nov 06, 2009 at 01:23:25AM +0100, Aljaz Fajmut wrote:
> human table: id weight size
> person table: id name surname address
If I understand your question correctly, you need to build the right
relationships. If you lived in the Star Trek universe, you might have:
class Person < Act
Todd A. Jacobs wrote:
> On Sat, Nov 07, 2009 at 01:03:37PM +0100, Aashish Kiran wrote:
>
>
>> I am new to rails. can anyone explain in detail about partials in
>> rails. my rails version is 2.3.4. How to use them?
>
> Partials are basically "includes." The tricky part is generally getting
> var
7H3LaughingMan wrote:
> Alright I have set it all up and it will convert it to the lowest form
> (and back for debugging purposes), however whenever I try to edit and
> save using @armor.update_attributes(params[:armor]) it fails for some
> reason.
Fails in what way?
> Here is a link to show yo
2009/11/6 Heinz Strunk :
>
> Marnen Laibow-Koser wrote:
>>
>> If it's only one request cycle, there's no real need to save temp data.
>> What are you trying to do?
>>
> That's exactly my problem, otherwise I would be using variables. It's
> many request cycles going back and forth that's why I nee
On Sat, Nov 07, 2009 at 01:03:37PM +0100, Aashish Kiran wrote:
> I am new to rails. can anyone explain in detail about partials in
> rails. my rails version is 2.3.4. How to use them?
Partials are basically "includes." The tricky part is generally getting
variables from the main view to propaga
Alright I have set it all up and it will convert it to the lowest form
(and back for debugging purposes), however whenever I try to edit and
save using @armor.update_attributes(params[:armor]) it fails for some
reason. Here is a link to show you what I did with the model...
http://pastebin.com/me
Colin Law wrote:
> 2009/11/7 Aashish Kiran :
>>
>> hi,
>> can anyone tell how to pass params to a partial.
>> --
>
> As Leonardo Mateo pointed out in your other thread,
> http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials
> should help.
>
> I presume you have already worked
render :partial => 'some_partial', :locals => {:need_in_partial =>
@recived_from_controller}
2009/11/7 Colin Law
>
> 2009/11/7 Aashish Kiran :
> >
> > hi,
> > can anyone tell how to pass params to a partial.
> > --
>
> As Leonardo Mateo pointed out in your other thread,
> http://guides.rubyonrai
I'm use Ruby 1.9 via rvm and Rails 2.3.3. I'm on OS X 10.5 and I have
the mysql 2.8.1 gem installed. When I run rake on my rails app, I get
the error "wrong argument type Mysql (expected Struct)". I can run
the app fine with script/server and script/console fine. Is anyone
else having this pro
I don't agree.
Best,
Eric
On Nov 7, 10:22 am, Marnen Laibow-Koser wrote:
> Eric wrote:
> > I would put this in a callback in the controller. I suggest starting
> > at before_save and go from there.
>
> That would work, but I think it's conceptually wrong for what the OP
> wants.
>
> > -eric
>
>
On Nov 6, 11:07 pm, Salil Gaikwad
wrote:
> > Save a file where? On the server's filesystem or the client's? Not
> > much info in this question...
>
> > --Matt Jones
>
> Hi Matt,
>
> I want to save file at Client's System.
>
The most reliable way to get a file to download every time (regardless
Eric wrote:
> I would put this in a callback in the controller. I suggest starting
> at before_save and go from there.
>
That would work, but I think it's conceptually wrong for what the OP
wants.
> -eric
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http:
I would put this in a callback in the controller. I suggest starting
at before_save and go from there.
-eric
On Nov 7, 8:05 am, 7H3LaughingMan wrote:
> I would like to know if it is possible to alter a variable during the
> process of a custom validation. I know that it is no longer validation
You also could use paginate_by_sql
2009/11/7, C K Kashyap :
>
> Hi All,
> I have a situation where I have a task model, tag model and a link
> table task_tags.
>
> In a particular view, I need to display a list of task that have a
> certain tags -
> For this, I'd need to run a query and get the r
On Sat, Nov 7, 2009 at 12:49 AM, Heinz Strunk
wrote:
> No, user doesn't leave. It just could end up in many request cycles.
> Didn't have the Session a very small amount of data it can save?
That depends on how you're handling sessions, but the more I think
about it, I'd just go with the Form o
It returns nil when you use joins or includes on your finds. Try
records.sort_by_distance_from origin. That will add the distance
column back
2009/11/6, jenna_s :
>
> Hi,
>
> I'm using the geokit plugin to provide a "find-locations-on-radius"
> feature in my app. When a location is added to the d
7H3LaughingMan wrote:
> I would like to know if it is possible to alter a variable during the
> process of a custom validation. I know that it is no longer validation
> when your altering data but in my opinion there are times when you
> need alter it for simplicity sakes.
That's not what validat
Hello!
I'm quite new to the rails framework and I just discovered the
different kind of associations in models. For the application I'm
creating, I need some polymorph associations. The model I created,
works great. Now I need to create some views for editing the objects
with these associations.
Either you render the resort show action if your create fails or you
use ajax to update only the comment part of your view.
2009/11/6, bingo bob :
>
> I've got a resorts view, shows details of a ski resort. Under the resort
> description I allow users to leave comments on the resort - works fine.
Use cookies[:name] = whatever in your response action
2009/11/6, Jens MF :
>
> HI: I want to make a JSON GET request and have a 'setCookie' entry in
> the http response header. By default there is none.
> How can I enable cookies with JSON?
>
> -Jens
>
> >
>
--
Von meinen Mobilgerät aus gesende
I would like to know if it is possible to alter a variable during the
process of a custom validation. I know that it is no longer validation
when your altering data but in my opinion there are times when you
need alter it for simplicity sakes. A good example would be for a
world wide auction house
Victor Martin wrote:
> Frederick Cheung wrote:
>
>> What the current directory is might depend on how you start the app,
>> but in general it is the top level of your app. Either chdir to the
>> folder containing your binary, use an absolute path or specify the
>> path relative to the current dir
Frederick Cheung wrote:
> What the current directory is might depend on how you start the app,
> but in general it is the top level of your app. Either chdir to the
> folder containing your binary, use an absolute path or specify the
> path relative to the current directory.
>
>
> Fred
Oh, I f
MJFuzz wrote:
> Hello,
>
> I just completed my first real rails application. I successfully
> deployed it, configured apache/mongrel clusters, etc. However, I do
> need to make code changes on the site often.
Just checking: you are using decent version control, right?
> I noticed the only time
Paren use is optional except when required to disambiguate, i.e. when
method1 takes two args and the first is method2 (which takes one or
two args) you would use parens to group method2's args.
It's a Ruby thing. Can be tough to get used to if you're coming from
a c background and are used to th
On Nov 7, 12:24 pm, Victor Martin
wrote:
> Hi there
>
> I make a call jsut like this:
>
> value = `./simulated_annealing`
>
> Which is a C Object file, but Rails tells me it cannot find that file. I
> put it in the same dir that the rest of the models files (since it's
> called by one of those
2009/11/7 Aashish Kiran :
>
> hi,
> can anyone tell how to pass params to a partial.
> --
As Leonardo Mateo pointed out in your other thread,
http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials
should help.
I presume you have already worked through the Getting Started guide.
hi,
can anyone tell how to pass params to a partial.
--
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 rubyon
On Sat, Nov 7, 2009 at 9:03 AM, Aashish Kiran
wrote:
>
> I am new to rails. can anyone explain in detail about partials in rails.
> my rails version is 2.3.4.
> How to use them?
Have you search something about this? I'm pretty sure this has been
explained zillions of times before, for example, h
hi all..
I m using cron for my application.
already for my 1st task i use the schedule.rb
again i want to use cron job again for my 2nd task.
is it possible to use the same schedule.rb file?
why i ask is whenever i modify any of my tasks settings it overwrites
the schedule.rb file.
so how can i s
Hi there
I make a call jsut like this:
value = `./simulated_annealing`
Which is a C Object file, but Rails tells me it cannot find that file. I
put it in the same dir that the rest of the models files (since it's
called by one of those models), but I guess it should be in any other
place.
What
I am new to rails. can anyone explain in detail about partials in rails.
my rails version is 2.3.4.
How to use them?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on
Hi, everyone!
We just released The iRequest Live! webapp.
It is based on qooxdoo frontend, and Ruby on Rails backend.
I have provided some qooxdoo + rails integration tips on the qooxdoo
website.
The iRequest Live! lets you create playlists from which people can
request songs using any cellphone
Leonardo Mateo wrote:
Ok Leanardo i will try this and get back to you .
--
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 grou
On Nov 7, 12:21 am, Matt Harrison
wrote:
> On Sat, Nov 07, 2009 at 12:06:07AM +, Matt Harrison wrote:
>
> It turns out that hash is a method defined by activerecord already. I
> originally had problems naming my model Hash so I changed it to FileHash. I
> didn't realise that hash was a meth
We are looking for multiple talented Senior Web Developers with a
history of commercial product & consumer-oriented web application
design and high-end development and exposure to the full project life
cycle. The successful candidate must have a excellent working
knowledge of software design patte
On Nov 7, 5:40 am, C K Kashyap wrote:
> Hi All,
> I have a situation where I have a task model, tag model and a link
> table task_tags.
>
> In a particular view, I need to display a list of task that have a
> certain tags -
> For this, I'd need to run a query and get the results that would need
On Sat, Nov 7, 2009 at 6:57 AM, Antony Nambikkai
wrote:
>
> Leonardo Mateo wrote:
>
> But Leonardo there is no Gem a Postgre Adapter
>
> I checked that already ..
>
>
> Kindly help me ...
>
> also in database.yml file I change the the adapter name from postgresql
> to postgre This wa
Leonardo Mateo wrote:
But Leonardo there is no Gem a Postgre Adapter
I checked that already ..
Kindly help me ...
also in database.yml file I change the the adapter name from postgresql
to postgre This was suggested in a web page .
Thanks in advance,
Antony Prabhu N
--
Po
On Sat, Nov 7, 2009 at 6:45 AM, Antony Nambikkai
wrote:
>
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_a
> dapters/abstract/connection_specification.rb:76:in
> `establish_connection': Pleas
> e install the postgres adapter: `gem install
> activerecord-postgres-
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_a
dapters/abstract/connection_specification.rb:76:in
`establish_connection': Pleas
e install the postgres adapter: `gem install
activerecord-postgres-adapter` (no
such file to load -- active_record/connection_adapters/p
Hassan Schroeder wrote:
>
> Is there any chance your form data needs to persist across sessions,
> (as in user leaves, comes back, resumes filling in unfinished form)?
>
> If not, you could save your variables in a hash in session. Otherwise
> I would create a Form model and save it to the DB.
>
57 matches
Mail list logo