Displaying 20 results from an estimated 600 matches similar to: "how rails insert object id to database?"
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",*
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
2008 Dec 04
1
upload test images using rake with populator
I am wondering if it is possible to upload test images to the database
along with the other fake user data. I am using populator along with
faker for fake test data and it is working very well. I am able to do
things like:
User.populate 100 do |user|
user.username = Faker::Name.first_name
user.email = Faker::Internet.email
end
but I am wondering if theres a way to do
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
Basically, I''m trying to crop multiple images out of a remote/original
scene.. Think flickr ''tagging'', only, the pixs in the tagged boxes
become their own unique images.. by way of simulating an upload from
the controller using attachment fu.. can''t quite figure out the
specific method in fu that would allow me to do this.. I''m so near the
edge right
Mysql::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)
2009 Aug 04
0
Mysql::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)
Hi, I''ve got an error when I upload a record by iPhone with Chinese
character.
Processing ScoresController#create (for 123.204.56.133 at 2009-08-04
16:19:52) [POST]
Parameters: {"score"=>{"score"=>"79.60", "player_name"=>"δΈ€",
"iphone_identifier"=>"6b194f783d645ba1a7c30c0e31b1b67300eb0a25"},
2013 Sep 19
0
Performance problem generating URL for thousands of images, due to hitting HDD for each one
Hi,
I have a model where I''m using Carrierwave to let users upload their
avatars. I have one version for the avatar, cropped to a square called
"cropped".
class User
mount_uploader :avatar, AvatarUploader
end
class AvatarUploader < ImageUploader
version :cropped do
process :crop
end
end
In one of my pages, where I''m listing a few thousand users,
2007 Dec 06
0
saving the user id for thumbnails using attachment_fu
I am using attachment_fu to create thumbnails, and it is working
great. However, I am have a view with all my users thumbnails
displayed and am trying to make it so when you click on a thumbnail of
their avatar, it shows that users profile. In order to accomplish
this I have saved a user_id identifier for each avatar, but the
problem is that attachment_fu only saves this user_id for the main
2011 Aug 25
0
Rails 3.0 Fleximage Error Errno::EACCES
Hi,
I''m using Fleximage on my website so users can upload avatars. I
recently upgraded to Rails 3.0 and switched host to slicehost.com. I
successfully installed imagemagick and the gems rmagick and fleximage.
Everything seems to be working fine except when I try to edit my account
and upload an avatar. After selecting an avatar and click the update
account button I get the following
2010 Apr 26
2
woriking under webrick but not under passenger
Hi!
I have just added login feature to my rails application (followed the
instruction from (Agile Web Development with Rails) but now I am getting
strange errors (looks to me like some kind of routing problem) under the
passenger/apache.
The error is:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
From the log:
2006 Dec 15
4
Why won't Rails update my object attributes?
Here''s the issue: When I submit a form for updating,
@person.update_attributes doesn''t work. But the next nested clause for
updating images DOES work. How is that possible? However no matter
what I do the Person object will not change its attributes.
def edit
@person = Person.find(params[:id])
if request.post?
@person.update_attributes(params[:person])
2006 Apr 22
2
Question about functional tests and log/test.log
Here''s something a bit weird:
After running functional tests, my test log contains many lines,
including many like these:
> Processing UserController#attempt_login (for 0.0.0.0 at 2006-04-22
> 02:38:08) [POST]
> Session ID:
> Parameters: {"user"=>{"password"=>"bogus",
> "email"=>"tmornini@bogus.com"},
2008 Jul 09
1
Problem with ActiveScaffold+RecordSelect
Hello,
i''m using this two plugins.
But i have some problems.
My model is USER belongs_to :avatar.
Error is the follow:
NameError in Admin/avatarsController#browse
undefined local variable or method `field'' for
#<Admin::AvatarsController:0x68aae98>
RAILS_ROOT: C:/Progetti Rails/RNetPortal
Application Trace | Framework Trace | Full Trace
Request
Parameters:
2003 Mar 13
2
Bizarre problem - happens only under XP and not 2000
I have a very strange problem, which no one has been able to fathom to
this point so I'm hoping that someone here may have encountered
something similar. I'd better note down some background details first.
Relevant machines involved:
Win2K Adv. Server SP3 (acting as Active Directory primary)
Win2K Pro SP3 (authenticates against Win2K server above)
WinXP Pro SP1 (authenticates against
2006 Apr 19
0
My database model''s connection appears messed up.
I am trying to add data from a form, and the rails doesn''t appear to be making
any effort at all. I''ve put deliberately erroneous data, but still nothing.
All the development log shows is this.
This is the code in use - based on the example from Rails book
def add_customer_admin
if request.get?
@login = CustomerAdmin.new
else
@login =
2008 Nov 28
0
Paperclip Plugin - Routing Error?
Hi-
I am using the plugin "paperclip", this is my second time using it,
the first time, I had no
issues...
This time, I added paperclip onto my model, no issues until I tried to
render the images I uploaded. I see this in the development.log:
ActionController::RoutingError (No route matches "/avatars/2/original/
DSCN2149.JPG" with {:method=>:get}):
I didn''t
2006 Feb 23
4
MySQL Duplicate Key Error
I am a newbie and I am running into a problem which I cant understand. I
have a table called ''privileges'' which has the following fields
CREATE TABLE `sdqualplanner`.`privileges` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(20) NOT NULL default '''',
`description` varchar(100) NOT NULL default '''',
`section_id`
2005 Sep 29
2
Compiling libspeex for Blackfin
Hi all,
I'm trying to run speex on the Blackfin processor. I'm not familiar
with programming/compiling/linking at all, but I guess the first thing
I need is libspeex compiled for Blackfin, so that my program can use
the library functions. I've downloaded the source files (version
1.1.10) from www.speex.org and I've been trying to compile libspeex
from within VisualDSP++, but it
2019 Aug 01
1
I need to open the personal homepage function, thank you very much.
Because I am from China, this is the English name.
Alan Bartlett <ajb at elrepo.org> ?2019?7?30??? ??10:42???
> On Tue, 30 Jul 2019 at 07:03, lost maniac <maniac.cn at gmail.com> wrote:
> >
> > I need to open the personal homepage function, thank you very much.
> > My wiki account is: LostManiac
> >
> > thank you very much
> >