Displaying 20 results from an estimated 30000 matches similar to: "File Upload and copying that file to several servers"
2008 Feb 08
2
update_Attributes stale Object error
Hi,
IN one of my unit tests I get an ActiveRecord::StaleObjectError:
Attempted to update a stale object
object.save!
in object I have apart from other stuff an after_save method, which
calls
object.assosication.update_attributes(...)
If I remove that line from my code my tests succeeds.
Unfortunetly, I do not understand why an update_attributes call can
generate an StaleObjectError.
Maybe
2007 Jun 26
1
ActiveRecord: Attribute Setter for belongs_to relation attribute
Hi,
I m trying to link into the process of setting an belongs_to attribute
in my model. Unfortunetly, it does not seem to be as easy as for
"normal" attributes.
I ve tried the following:
class Treatment < ActiveRecord::Base
belongs_to :drug
def drug=(new_value)
''my stuff
super new_value
end
However, that does not work. Ive also tried self[:drug] =
2008 Nov 12
5
dynamic condition for has_one and eager loading issue
Hi,
I ve defined the following relation in one of my models with a dynamic
where condition:
has_one :selection,
:foreign_key => ''object_id'',
:conditions => ''selection_type = 1 and account_id = #
{self.send(:account_id)}''
That works perfect, however when I try to eager load that relation I
am getting the following error when doing a
2007 Sep 17
1
observe_field and :function
Hi,
I m using the observe_field helper with the :function attribute.
If I do the following everything it works without any issue:
<%= observe_field ''select_gender'', {:function => "(value == ''2'') ?
$(''record_ohrmarke'').value = ''a boy'':
$(''record_ohrmarke'').value = ''a
2012 Mar 27
4
Upload
hello everyone,
i have written an upload controller which handles files in a multipart-
form. it scans through the bytes to check if it''s an acceptable file.
my problem is to get the progress of the upload of a single file. i
loop through my params to move every file to the server and it''s
working properly.
is there a method to check whether a file has been completely
2011 Mar 26
2
upload file, read first 10 lines.
I have a csv file and in my controller:
uploaded_file = params[:upload][:csv].read
@rows << FasterCSV.parse(uploaded_file)
I want to put in @rows only the first 10 lines but the read method
reads all the file.
How can I do?
--
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
2002 Mar 05
1
oggenc rc3 fails on this one
OggEnc rc3 has trouble with this file. It adds high frequency gunk
to the percussive synth part. Lame encodes it fine.
http://www.teaser.fr/~amajorel/misc/nabogg.wav
http://www.teaser.fr/~amajorel/misc/nabogg.ogg
--
André Majorel <URL:http://www.teaser.fr/~amajorel/>
std::disclaimer ("Not speaking for my employer");
--- >8 ----
List archives:
2009 Nov 17
6
after changed the tag i got the same eror
SyntaxError in Upload#index
Showing *app/views/upload/uploadfile.rhtml* where line *#10* raised:
compile error
app/views/upload/uploadfile.rhtml:10: syntax error
Extracted source (around line *#10*):
7: <% end %>
Trace of template inclusion: app/views/upload/uploadfile.rhtml
RAILS_ROOT: /home/malathi/www/upload
Application Trace <http://localhost:3000/upload#> | Framework
2009 Dec 24
12
no such file to load -- ferret
Hi there,
I''m just trying to deploy my app to my vhost, and i''m getting an error
on the phusion passenger page:
no such file to load -- ferret
now everything worked fine in development.
DO i need to reinstall the plugin and gem again? if so - would these
be in domain.com/public? or should it be installed at domain.com?
ANy advice would be great!
THank you.
--
You received
2005 Oct 31
1
Truncating with decoding/recoding
Hello all. Thanks for FLAC. It's served me well for the past few
years.
Is there a program out there to truncate a FLAC file without
decoding/recoding it ? Preferably command-line (I already know at
what point I want to truncate it).
Thanks in advance.
--
Andr? Majorel <URL:http://www.teaser.fr/~amajorel/>
Do not use this account for regular correspondence.
See the URL above for
2009 Aug 05
1
[PATCH] Compute MD5 of COPYING.LIB used in upload and download tests
As suggested by rjones.
---
src/generator.ml | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/generator.ml b/src/generator.ml
index 94dc268..7ac4ac8 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -1756,7 +1756,8 @@ This uses the L<blockdev(8)> command.");
[InitBasicFS, Always, TestOutput (
(* Pick a file from cwd which isn't
2009 Nov 02
7
*** Quick help with paperclip ***
Hi All,
Someone reccomended using paperclip as a way to easily upload photos.
Basically I want a quick and easy solution to allow users to add a
profile picture.
Anyway - I have followed the tutorial on here:
http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/
I can add a file, but there isnt anywhere to upload it.
I have followed the above tutorial word for word, but i dont
2012 Oct 27
7
Photo Paperclip::CommandNotFoundError
Hi all,
I am using paperclip plugin. when i am trying to upload photo i am
getting this error " Photo Paperclip::CommandNotFoundError "
and i am getting this error on my server production mode. if i run on
development mode on my server i can able to upload the pic. why this is
happening i have no idea.
can any help me out.
Cheers,
Kp
--
You received this message because
2011 Jun 18
3
Unconditionally transfer files
Is there a way to make rsync unconditionally transfer files,
i.e. create them anew even if the target already exists and is
identical to the source ?
rsync -I looks closer but still avoids transferring the files.
--
Andr? Majorel http://www.teaser.fr/~amajorel/
2009 Jul 31
8
Would like include model association in to_xml
i have:
class Library << ActiveRecord::Base
has_many :books
end
class Book << ActiveRecord::Base
belongs_to :library
end
in my controller i have:
render :xml=> Library.find(:all).to_xml(:include=>books)
but, i would like put a condition in the books ( e.: pages >= 100 )
i would like to create a xml with all Libraries, but books with pages more
than 100)
How to
2010 Jan 03
9
ferret search in production
Hi there,
after recently deploying my app, I have noticed that the search
results are not being displayed...
When I look in my app, I also notice that the apps content (search
criterea) is not being indexed, so I dont have an index folder being
created.
I read on a google post that it may be that the ferret.yml server
isn''t started (or perhaps the content of this file are not right)
I
2010 Jan 10
3
Need advice: threads or Typhoeus?
Hi guys,
I need my app to make a few hundreds requests to external web services
as quickly as possible. The web services are fairly fast, but still:
if I do the requests one after the other, it is too slow.
My understanding is I have two options:
a- Threads.
b- Typhoeus
Typhoeus seems great. Yet, the web services are all quite different
(some are SOAP, some REST...) and therefore wrapped into
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to
2.2.2.
I am almost there but I have hit a problem with ActiveRecord.
Before the upgrade, the following code was working fine.
def create_root(administrator)
root = create_root_collection(self.pingee_name,
administrator,
2009 Dec 29
15
help needed - undefined method `reenable' for <Rake::Task db:schema:dump => [environment]>:Rake::Task
Hello,
I am trying to deploy my app at the moment, and each time I do, I get
the following error when i run a trace on it:
rake db:migrate --trace
(in /srv/some area/someplaceelse...)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
rake
2010 Aug 18
0
paper clip plugin validation fails
hallo friends i developpeda photo uploader using paper clip plugin
its working quite well , but one problem is its able to upload all
kinds of file. see i want only png,gif,jpeg and should show error
message if validation fails.here if i applied validations in the model
the result is errors like this
ArgumentError (too few arguments):
app/controllers/images_controller.rb:63:in