similar to: PROBLEM WITH PAPERCLIP

Displaying 20 results from an estimated 500 matches similar to: "PROBLEM WITH PAPERCLIP"

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
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]
2006 Jan 14
11
accessing models from migrations
Ok, so now Users need to be associated with Organizations. I''ve created a migration and added a ''organization_id'' column to the users table. I want the default organization_id to be the first Organization. So I have :default => Organization.find(:first). But it''s complaining about not being able to find the constant ''Organization''. Any
2010 Feb 25
2
[PATCH] Enhance vms display
It can be quite hard to manage a pool of 40-50 VMs without informations about the OS running, the contact (which is the only one to know when the vm can really be destroyed) or an End Of Life date. This patch add those fields, and rework a little the VM list view, in order to show gracefully those new fields. It has been made at the expense of UUID, Total Run Time & Load fields. Since those
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
2006 Apr 02
5
adding primary_key to join table using migrations
Hi list, My tag_question_user join table is not currently a full-blown model. It doesn''t have a primary key - just tag_id, question_id, and user_id. I now want to add a primary key to this model (because I want to add a "description" column as well so users can describe the tag. I''m not sure how to add this using migrations. Here is what I have: class AddNotesToTags
2008 Feb 13
4
Migration Issues: Can't update newly added column values
Hello everyone, just wondering if anyone can help me with a migrations question here. Using: rails 2.0.2 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin] mysql 5.0.45 Platform: windows xp The problem: ---------- I created a migration that is designed to add a column named "deleted_at" (timestamp) and then remove a column named "is_deleted" (boolean). The idea is to
2006 Jul 06
5
Building a standalone application with RoR
Hello, I have to code a small application for a car repair shop running under Windows (98 SE but may be my client could upgrade to 2000) and using RoR is my definite choise ! The app will be powered by WebRick (which is enough powerfull for a small app used by only ONE user at a time) My questions are targeted to the best database to use... I had a look to SQLite and Firebird but support
2006 Nov 29
2
db:migrate to add colum bombs...
Hi I get the following when I try and run "rake db:migrate" (I"m running un Ubuntu linux) ********** code ********** (in /<home hidden>) == AddRpts: migrating ========================================================= -- add_column("rpts", :integer, {:limit=>3}) rake aborted! You have a nil object when you didn''t expect it! You might have expected an
2009 Sep 03
12
paperclip is not saving the files
Hi all, I''ve installed paperclips but paperclip is not saving the files my model has has_attached_file :attachment,:styles => { :medium => "300x300>", :thumb => "100x100>" } and i have db migration as class AddAttachmentToPolicies < ActiveRecord::Migration def self.up add_column :policies,
2006 Jun 15
6
Newbie''s problem with a nil object he didn''t expect!
Dear Rubyists/Rails gurus, Though I''ve successfully completed the various Rails tutorials online and the Depot application from the Agile Web Development with Rails book, I''m still pretty much a Ruby/Rails newbie. I''m trying to learn by writing my own simple blogging application, but I''ve run into a problem that has had me scratching my head for a few days now.
2006 May 16
5
rake aborted when adding a column
I''m having a silly little problem with migrations.  All I''m trying to do is to add an SSN column to my Employees table.  I generated a migration which looks like: class AddSsn &lt; ActiveRecord::Migration def self.up     add_column :employees, :ssn, :string end def self.down     remove_column :employees, :ssn   end end When I run this, however, I get: &gt;rake
2006 Apr 03
2
HABTM migrations
Bad rails day for Matt- In a migration, for a habtm: create_table :teams_users do |t| t.column :team_id, :integer t.column :user_id, :integer end Ok, fine. In a controller (well really a migration script): @user.teams << Team.find( 3 ) And the SQL pumped at my server is: INSERT INTO teams_users (`team_id`, `id`, `user_id`) VALUES (3, 3, 34) Which
2006 Apr 05
16
Migration won''t rollback to specific version?
Hi all, I''m confused about how migrations work. I''ve been using them for a couple of weeks but haven''t had any serious rollback issues yet. Just now I added a field to a table with a migration and ran "rake migrate", which added the field as expected. This was in the file db/migrate/007_mymigration.rb, making it version 7. Later I changed my mind and
2010 Aug 25
2
[PATCH] Virtio support
From: Simon Courtois <scourtois at linagora.com> Signed-off-by: Simon Courtois <scourtois at linagora.com> --- src/app/controllers/vm_controller.rb | 19 ++++++++++++++++- src/app/views/vm/_form.rhtml | 25 ++++++++++++++++++++--- src/db/migrate/044_add_virtio_to_vm_and_nic.rb | 11 ++++++++++ src/public/stylesheets/components.css | 5
2006 Jun 09
2
Creating An Extra Association Between Two Tables
Good Friday Everyone :-). These are my models: Problem -> has_and_belongs_to_many :tags Tag -> has_and_belongs_to_many :problems Now if a tag does not exist and I create it and associate it to the problem it works self.tags << Tag.create(:name => tag) But if I have the tag already in the DB and just want to link it to another problem it does not really like me. I do it
2009 Feb 17
8
Converting Acts_As_Tree to Acts_As_Nested_Set
Hello, I have a tree structure that needs to be converted into a nested set. A great deal of work has already been done on the tree items, so maintaining the integrity of the id''s is mandatory. However I need the ability to access entire branches of the tree, which is what Nested set does. Does anyone have any suggestions on how to efficiently transfer the tree to the nested set and
2006 May 23
7
has_and_belongs_to_many question
Hello, I am trying to make the "switchover" to programming my apps in Rails and have a question about database structure. In the past i would structure a many to many like this: categories ---------------------------------------------------- | id | name | ---------------------------------------------------- 1 Some Category 2 Another