Displaying 20 results from an estimated 1000 matches similar to: "upload test images using rake with populator"
2011 Aug 07
2
PROBLEM WITH PAPERCLIP
hello,
i am trying to upload a image file ...using paperclip in rails 3
i did as follows
1. In gemfile => included gem paperclip
2.In config/environments /development.rb => Paperclip.options[:command_path]
= "/usr/bin/" (convert path)
3.created a controller *picusers *and defined => def create
@picuser = Picuser.create(params[:picuser])
end
4.created a model *picuser
2010 Aug 07
12
Paperclip Trouble - Not Writing to the Database
Hello all,
I''m a Rails newbie trying to get a basic implementation of Paperclip up
but it''s giving me problems. I''m developing on Windows XP (I know...)
with WEBrick and MySQL.
In my model I have:
class User < ActiveRecord::Base
has_attached_file :avatar,:styles => { :medium => "300x300>", :thumb
=> "100x100>" }, :url =>
2009 Nov 27
1
Cucumber + Paperclip
Hello Friends,
First time I am writing a scenario for uploading images. But some how
things are not working as it should be
The cucumber scenario is
And I attach the file at "/home/user/Desktop/sdasd.png" to "avatar"
And I press "Upload Logo"
But I trace it. its showing up
avatar_file_name: "sdasd.png", avatar_content_type:* "text/plain",*
2009 Jan 07
0
how rails insert object id to database?
[4;35;1mUser Create (0.5ms) [0m [0mINSERT INTO `users` (`name`,
`avatar_file_name`, `avatar_file_size`, `created_at`, `updated_at`,
`avatar_content_type`) VALUES(''hello'', ''Screenshot.png'', 253800,
''2009-01-08 08:27:19'', ''2009-01-08 08:27:19'', ''image/png'') [0m
[paperclip] Saving attachments.
[paperclip]
2011 Feb 07
9
Best way to populate development database
What would be the best way to populate a development database for a
Rails 3 app? I have looked at faker, but it seems that development has
stopped, any other options?
--
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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To
2005 Jul 06
2
Samba LDAP timeout
Hello,
I'm having trouble configuring an Ubuntu Hoary Samba server to use LDAP
for authentication (the server is named "dixie"). I'm basing my
configuration on another server here at work that connects just fine. When
I try to just list samba shares on dixie with
$ smbclient -L dixie -U faker
It takes quite some time for the request to go through before failing.
Looking at the
2011 Apr 16
17
Rails 3 Crashing On Windows 7
Hi guys,
I have Rails 3 running on Windows 7 with Ruby 1.9.2
Every now and again, my server crashes, and I see the following
information in the windows event log:
Faulting application name: ruby.exe, version: 1.9.2.180, time stamp:
0x4d5ee5ed
Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time
stamp: 0x4d5ee5ec
Exception code: 0xc0000005
Fault offset: 0x0011a00e
Faulting process
2010 Sep 01
1
Faking Paperclip has_attached_file with Factory girl?
Hello!
I wonder if it''s possible to simulate Paperclip''s has_attached_file
with Factory Girl and then test it with Rspec. I don''t get it to work.
My factories.rb file looks like this:
Factory.define :user do |user|
user.name "Anders"
user.email "user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org"
user.password
2010 Sep 30
5
response.should have_text leads to undefined method `has_text?'
One of my controllers directly renders some JSON output that I would
like to test with RSpec. For that I use ''response.should
have_text("foobar")'' in my spec file, but that leads to a
Failure/Error: response.should have_text("enim")
undefined method `has_text?'' for #<ActionController::TestResponse:
0xb6736944>
I read here somewhere that webrat
2013 Aug 22
1
How do I deal with ActiveRecord::RecordInvalid: Validation failed:
Hello all,
I am currently writing model tests in rails 4. I am attempting to add an
error to a reservation object if the total number of reservations for a
given date and time has reached a pre-determined limit.
When my test runs, it is hitting the appropriate code but it is raising the
following error as opposed to just giving me an error in the object that I
can use.
2009 Jul 20
9
rake error
When I run rake test:units I get this error:
292 tests, 350 assertions, 2 failures, 13 errors
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -I"lib:test" "/
usr/loc...]
This error just showed up yesterday --- I have no idea how I caused
it. Here is my gem list in case that helps:
actionmailer (2.3.2, 2.2.2)
actionpack (2.3.2, 2.2.2)
activerecord (2.3.2, 2.2.2)
2004 Aug 23
3
could not copy a file bigger than 1GB
Hi,
I have installed Samba 2.2.8 on AIX 5.2 server. I tried to copy a
file (around 106 GB) from win2k server to this AIX box. The "copy"
process was stop when the file was copied up to 1GB. Do you know what
was wrong? Is there anything I need to set on AIX server site in order
to transfer large file?
-Shujane
2006 Mar 31
4
How to have a form within a form?
Say I am building a blogging platform, and I want to allow users to be
able to add an avatar without leaving the page, when they''re writing a
post. I need the avatar information to be included in the form for the
post. So for example, after a user adds a new avatar while writing a
new blog post, it would be available to be selected as the avatar to be
used for that post. What is
2011 Sep 12
1
nested anova<-R chrashing
Hi,
I tried to do a nested Anova with the attached Data. My response
variable is "survivors" and I would like to know the effect of
(insect-egg clutch) "size", "position" (of clutch on twig) and "clone"
(/plant genotype) on the survival of eggs (due to predation). Each plant
was provided with three different sizes of clutches (45,15,5) and had
2011 Dec 12
1
calculating logit parameters (odd ratio is exactly one or zero)
Dear statistician experts,
Sorry if this is a trivial question, or the old same question (i don't know
what is the efficient key word for this issue).
In order to understand the calculation of parameter of logistic regression,
I did an exercise through spreadsheet following the procedural example
from a literature, or the available spreadsheet (with calculation formula).
I ended up with
2010 Jun 09
4
rails+sinatra sent image
Hi!
I have simple rails application - users with name and avatar and in
sinatra I want to create new user.
form for new user
<form action="/users/create" enctype="multipart/form-data"
method="post">
<p>
<label for="name">Name: </label>
<input type="text" id="name" name="user[name]" >
2007 Aug 14
2
AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
Before I chalk this up as a bug and report it, I just want to make sure I''m not
doing something silly.
Running ZenTest''s autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the
following failed test:
ActiveRecord::AssociationTypeMismatch in ''User should create an avatar with
uploaded_data''
Avatar expected, got Avatar
This only happens with that exact
2012 Feb 08
2
slow creating files
We tried to migrate from old Windows fileserver (p4, single HDD) to
Samba (FedoraCore15, Samba 3.5.12-72.fc15, ext4 volume, xeon, raid5).
Our pipeline is so, that some special software generates files on that
fileserver.
The typical filesize ~50 mbytes.
On the old hardware, software (win2k3 server) the time of single file
creation was about 10 seconds. On the new configuration it takes 20-25
2023 May 29
4
[PATCH] ocfs2: check new file size on fallocate call
When changing a file size with fallocate() the new size isn't being
checked. In particular, the FSIZE ulimit isn't being checked, which makes
fstest generic/228 fail. Simply adding a call to inode_newsize_ok() fixes
this issue.
Signed-off-by: Lu?s Henriques <lhenriques at suse.de>
---
fs/ocfs2/file.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
2010 Jan 24
1
how to change fsize to unlimited..
Dear centos experts,
I am wondering is there a way for me to change ulimit fsize
parameter? I am trying to change it to unlimited, so
I added the following line to /etc/security/limits.conf
- - fsize -1
but it does not work, and a reboot will reset the content of
limits.conf.
thanks,
yan