development env:
Ubuntu 9.04
ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
rails -v
Rails 3.0.0
gem -v
1.3.7
Here what I did:
rails new testpaperclip -d mysql
cd testpaperclip
rake db:create
rails g scaffold user name:string address:string
rake db:migrate
== CreateUsers: migrating
===================================================-- create_table(:users)
-> 0.0400s
== CreateUsers: migrated (0.0400s)
========================================== rails plugin install
http://github.com/thoughtbot/paperclip.git
walk 13318e61a4953dfc3d2b76e0491b1651f26062fe
From http://github.com/thoughtbot/paperclip
* branch HEAD -> FETCH_HEAD
rails generate paperclip user photo
create db/migrate/20101102092748_add_attachment_photo_to_user.rb
rake db:migrate
added this line on models/users.rb
has_attached_file :photo
modify the first on views/users/_form.html.erb
<%= form_for(@user) do |f| %>
to
<%= form_for(@user), :html => { :multipart => true } do |f| %>
running rails s
on my browser
http://localhost:3000/users/
produce error
Errno::ENOENT
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start''
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread''
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start''
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each''
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start''
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start''
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start''
rack (1.2.1) lib/rack/handler/webrick.rb:13:in `run''
rack (1.2.1) lib/rack/server.rb:213:in `start''
railties (3.0.0) lib/rails/commands/server.rb:65:in `start''
railties (3.0.0) lib/rails/commands.rb:30
railties (3.0.0) lib/rails/commands.rb:27:in `tap''
railties (3.0.0) lib/rails/commands.rb:27
script/rails:6:in `require''
script/rails:6
Any help would be appreciated!
Thanks,
Wally
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.