espen / balder Goto Github PK
View Code? Open in Web Editor NEWBalder - Open source Ruby on Rails photo gallery
Home Page: http://balderapp.com
License: MIT License
Balder - Open source Ruby on Rails photo gallery
Home Page: http://balderapp.com
License: MIT License
i ran ...
rake db:create
rake db:migrate
and it all seemed to go smoothly.
i assume there's no db file that i need to edit since i'm on heroku.
but when i go here:
http://baldertestzish.herokuapp.com/account/new
and try to create the first user, it sends me to a general error page. 'heroku logs' doesn't seem to offer any helpful info. please assist.
FIXED...
looks like heroku just took a while to connect the database, as in a few hours?
I deployed the app to heroku and tried to upload some sample images through the web ui.
[[This | http://marcostestbucket.heroku.com/albums/1-test-album]] is the result. The lower half of the images is greyed out. When the upload process is running I can see that at ~60% the upload process is stuck for a short time and then moving up to 100% fast.
Using the last build with ruby 1.9.2-p290 ans rails 3.1.2
Try to destroy album or collection, in the edit.html.erb, but the url build with :
link_to("Delete this collection", { :action => "destroy", :id => @collection },
:confirm => "Are you sure you want to delete this collection?",
:method => :delete)
become something like :
http://localhost:3000/collections/1-nature
without destroy
Since user management is never fun, allowing a user registration via their Facebook, Twitter, OpenID, Github login would be a great feature.
All public content should be cached.
I have the app working, but there are functions missing that are needed to actually use it. For example, if you go to /photos/scan it does create the folders, but no status shown of the progress. Also, the permissions are not implemented: no way to enter data. Are you planning to finish the app?
After updating an image with new tags, a hyper link of that tag appears bellow the image.
However, clinking on the tag gives the following error:
Couldn't find Tag with ID=nature for example
The Flash-based upload is nice, but should give a standard input file when not using Flash. Most likely a bug in uploadify.
following: http://blog.inspired.no/rails-photo-gallery-balder-on-heroku-and-s3-726/
I get this error from heroku when I try to create the initial account. Suggestions?
2012-04-21T05:13:52+00:00 app[web.1]:
2012-04-21T05:13:52+00:00 app[web.1]:
2012-04-21T05:13:52+00:00 app[web.1]: Started POST "/account" for {ipaddress} at 2012-04-20 22:13:52 -0700
2012-04-21T05:13:52+00:00 app[web.1]:
2012-04-21T05:13:52+00:00 app[web.1]: ActiveRecord::UnknownAttributeError (unknown attribute: password):
2012-04-21T05:13:52+00:00 heroku[router]: POST {appname}.heroku.com/account dyno=web.1 queue=0 wait=0ms service=12ms status=500 bytes=728
2012-04-21T05:13:52+00:00 app[web.1]: app/controllers/users_controller.rb:12:in `new'
2012-04-21T05:13:52+00:00 app[web.1]: app/controllers/users_controller.rb:12:in `create'
2012-04-21T05:13:52+00:00 app[web.1]: app/middleware/flash_session_cookie_middleware.rb:16:in `call'
2012-04-21T05:13:52+00:00 app[web.1]:
2012-04-21T05:13:52+00:00 app[web.1]:
In the rails3 branch, the setup before filter found in ApplicationController wil always redirect to new_account_path even when we are creating this first new user.
I was able to get balder to upload to aws -- by changing the s3.rb file to carrierwave.rb and using the info that carrierwave asks you to use
I also used carrierwave 0.5.7
now it works -- but I need to figure out how to get the s3 absolute url the app thinks the files are local.
thx
sg
String does no longer have a to_a method, so photo.Keywords.to_a breaks for single tagged images. The solution was to use the Kernel#Array method in app/models/photo.rb:70
I moved some images on my server from one old gallery to the uploads folder into a new album. When I called /photos/scan to import the new photos, the scan algorithm created
new records for the previous images within the "photos" table.
Upload fails with HTTP error and log file has a few lines that don't help me much. Only fails after upload is almost done(94-100%) might happen right after upload is "done".
Tried with 1.2.1 and git master...
nginx passenger running the app ...
Started POST "/photos" for 87.100.142.22 at Sat Jul 16 00:49:12 +0300 2011
Processing by PhotosController#create as HTML
Parameters: {"photo"=>{"album_id"=>"1"}, "name"=>"IMG_175056.jpg", "authenticity_token"=>"notsureshouldyouseethis?", "file"=>#<ActionDispatch::Http::UploadedFile:0xb669ad50 @original_filename="IMG_175056.jpg", @tempfile=#File:/tmp/RackMultipart20110716-22434-1qezli1-0, @headers="Content-Disposition: form-data; name="file"; filename="IMG_175056.jpg"\r\nContent-Type: image/jpeg\r\n", @content_type="image/jpeg">}
Completed in 15ms
TypeError (can't convert nil into String):
app/controllers/photos_controller.rb:77:in `create'
Hi Espen,
I just finished installing Balder at http://tenc.herokuapp.com/ following your guide on:
http://blog.inspired.no/rails-photo-gallery-balder-on-heroku-and-s3-726/
The app itself runs, but I am having upload issues. I've tried everything documented here, but nothing has worked. I also looked at plupload documentation and the documentation doesn't get into your methods (RoR) in any detail.
I intend on uploading my images to S3. I've specified everything in balder.rb in terms of my AWS credentials, and have made the adjustment to force HTML5 uploads.
I know these details are vague but I'm fairly new at using Heroku and Rails, so any assistance is appreciated. I'll gladly provide more details as needed...since I'm not quite sure what you would need from me other than a detailed description?
Thanks for your help...
please add this to documentation for the app:
disable setup once you have created the first user with admin permissions!
i used your code to create a site and the user base grew very large. the line of code in the application controller that checks if there are any users:
'User.all.length'
created a huge lag on each page load.
so, you might want to document that this should be disabled after you've set up your administrator user.
Permanent links to images, that stay the same even if album is moved to another collection or image is moved to another album.
Using the last build with ruby 1.9.2-p290 ans rails 3.1.2
When i try to upload picture, I have this kind of message in my console :
Started POST "/photos" for 127.0.0.1 at 2011-11-20 10:47:29 +0100
Processing by PhotosController#create as HTML
Parameters: {"Filename"=>"024bb00f9e1f7cd64e0b24d15697e9d6.jpg", "authenticity_token"=>"TWa8mjcchMFSUgc8Rpz03lrjJXOCpHgGl6gK55jJ7Mk=", "name"=>"024bb00f9e1f7cd64e0b24d15697e9d6.jpg", "_balder_session"=>"BAh7CUkiD3Nlc3Npb25faWQGOgZFRkkiJTM2NDQxYjJkMmM0ZDNhMjZjNDJhOGQ3NjMzOTdmNTBiBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMVRXYThtamNjaE1GU1VnYzhScHowM2xyakpYT0NwSGdHbDZnSzU1ako3TWs9BjsARkkiFXVzZXJfY3JlZGVudGlhbHMGOwBGSSIBgDI1NDg2NWU4OGMzMDEzNzlkODhmOWY0YjRkMDZkMjQzOTFhOTRiMjY1NzE1MzA3ZDM2ZDEwM2ZhNjE4NmJmZjJhNGRjM2Y4YjA3NGIxMDQxNjFlZjliOTY0OThmZGJmZjMwZDVkYjY4NTJlMDI0ZjE3ZTA4Y2U4MWYzYTViNmNkBjsAVEkiGHVzZXJfY3JlZGVudGlhbHNfaWQGOwBGaQY%253D--df6f10472100e38a5579f2729c7ace19500c8bcd", "photo"=>{"album_id"=>"1"}, "file"=>#<ActionDispatch::Http::UploadedFile:0x007f93bf007d78 @original_filename="024bb00f9e1f7cd64e0b24d15697e9d6.jpg", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name="file"; filename="024bb00f9e1f7cd64e0b24d15697e9d6.jpg"\r\nContent-Type: application/octet-stream\r\n", @tempfile=#File:/var/folders/jt/0vpxzc750zx3c292wzmmw7f80000gn/T/RackMultipart20111120-5273-9c4g49>, "Upload"=>"Submit Query"}
WARNING: Can't verify CSRF token authenticity
User Load (0.7ms) SELECT users
.* FROM users
Redirected to http://localhost:3000/login
Completed 302 Found in 180ms
I have Balder running on my developer server just fine.
Now I have loaded Balder on to my webfaction account. I have been able to get it to work using S3 as the place where my photos are stored. But I can't seem to get that to work for me.
When I have it upload the images to my public uploads folder it loads fine but when I use S3 i run into all kinds of issues -- both for the uploader and the console.
I also can't get my images uploaded through the system.
I get output like this when I use the S3 settings you have -- I am not sure if I am doing it correct or not - do you have any other S3 directions?
thx --it is great app exactly what I need NO OTHER rails app pulls in IPTC info. I wish you had a tutorial on how you did that.
thx sg
=> ["ScanFiles"]
irb(main):002:0> ScanFiles.Scan(false)
analyze directory /home/smgitner/webapps/fws_gallery/balder/fallworkshop/fwsimages/uploads/files
Errno::ENOENT: No such file or directory - /home/smgitner/webapps/fws_gallery/balder/fallworkshop/fwsimages/uploads/files
from /home/smgitner/webapps/fws_gallery/balder/lib/scan.rb:18:in open' from /home/smgitner/webapps/fws_gallery/balder/lib/scan.rb:18:in
entries'
from /home/smgitner/webapps/fws_gallery/balder/lib/scan.rb:18:in ScanDirectory' from /home/smgitner/webapps/fws_gallery/balder/lib/scan.rb:11:in
Scan'
from (irb):2
irb(main):003:0>
Support for buckets running under cname.
I made a ugly and dirty hack to produce this effect in my gallery.
Images are served from static.ruohola.org, which has some S3 & Varnish proxy magic. Cutting the costs of S3 ;)
I'd like to integrate gallery to my existing project, the idea of this project is great but seem no way or you know anything?
Thanks
I get an error every time I use scandic chars like ä or ö in a tag name. Also albums with those chars leave ugly breadcrumbs.
Tag in question was: Ässät
and below is the log.
-- log start --
Started GET "/tags/assat/photos" for 127.0.0.1 at Thu Sep 22 12:33:22 +0300 2011
Processing by PhotosController#index as HTML
Parameters: {"tag_id"=>"assat"}
Completed 500 Internal Server Error in 3ms
NoMethodError (undefined method photos' for nil:NilClass): app/controllers/photos_controller.rb:9:in
index'
app/middleware/flash_session_cookie_middleware.rb:17:in `call'
-- log end --
Balder could use some way to re-create versions when using S3.
Scan doesn't work, when no local files are available.
Currently it uses the first image in the album
Are exif data supported? i dont see any referenced to the exif data in view or code
I have a patch for this over in https://github.com/rick/balder/pull/1, specifically https://github.com/rick/balder/commit/81af9e7eedef9cf5a1d676213f888d6cfee40fa7
but I'm not clear on what the various concerns are (and whether this will break something for other folks).
I was seeing these sort of errors consistently:
TypeError (no implicit conversion of nil into String):
app/controllers/photos_controller.rb:80:in `create'
app/middleware/flash_session_cookie_middleware.rb:16:in `call'
The cache_dir
method, which carrierwave seems to rely on, is only defined on Heroku + S3 configurations. It might actually need to be widened to be defined on all configurations, but I'm at least relying on S3 myself, so not sure.
per the disqus comments at your site, i see that no one had opened a ticket about error #2038 which is generated by the uploader...
2012-04-24T04:15:57+00:00 heroku[nginx]: 71.224.69.57 - - [24/Apr/2012:04:15:57 +0000] "POST /photos HTTP/1.1" 302 114 "-" "Adobe Flash Player 11" myapp.heroku.com
2012-04-24T04:16:03+00:00 app[web.1]:
2012-04-24T04:16:03+00:00 app[web.1]:
2012-04-24T04:16:03+00:00 app[web.1]: Started POST "/photos" for 71.224.69.57 at 2012-04-23 21:16:03 -0700
2012-04-24T04:16:03+00:00 heroku[router]: POST myapp.heroku.com/photos dyno=web.1 queue=0 wait=0ms service=637ms status=302 bytes=103
2012-04-24T04:16:03+00:00 heroku[nginx]: 71.224.69.57 - - [24/Apr/2012:04:16:03 +0000] "POST /photos HTTP/1.1" 302 114 "-" "Adobe Flash Player 11" myapp.heroku.com
Hello,
I'm interested in using balder, but I'm concerned about the license. I read that it was GPLv3, but then I just noticed the README says "Free for personal use. Contact me for commercial use."
Which one is it?
Albert
After adding a file manually to s3 I visited /photos/scan produced server 500 error, log output below.
2012-04-24T19:27:03+00:00 heroku[router]: GET photos.kfring.com/photos/scan dyno=web.1 queue=0 wait=0ms service=50ms status=500 bytes=728
2012-04-24T19:27:03+00:00 heroku[nginx]: 74.92.73.117 - - [24/Apr/2012:19:27:03 +0000] "GET /photos/scan HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19
(KHTML, like Gecko) Chrome/18.0.1025.163 Safari/535.19" photos.kfring.com
2012-04-24T19:27:06+00:00 app[web.1]:
2012-04-24T19:27:06+00:00 app[web.1]:
2012-04-24T19:27:06+00:00 app[web.1]: Started GET "/photos/scan" for 74.92.73.117 at 2012-04-24 12:27:06 -0700
2012-04-24T19:27:06+00:00 app[web.1]: analyze directory /app/public/uploads/files
2012-04-24T19:27:06+00:00 app[web.1]: Errno::ENOENT (No such file or directory - /app/public/uploads/files):
2012-04-24T19:27:06+00:00 app[web.1]:
2012-04-24T19:27:06+00:00 app[web.1]: lib/scan.rb:17:in `open'
2012-04-24T19:27:06+00:00 app[web.1]: lib/scan.rb:17:in `entries'
2012-04-24T19:27:06+00:00 app[web.1]: lib/scan.rb:17:in `ScanDirectory'
2012-04-24T19:27:06+00:00 app[web.1]: app/controllers/photos_controller.rb:66:in `scan'
2012-04-24T19:27:06+00:00 app[web.1]: lib/scan.rb:10:in `Scan'
2012-04-24T19:27:06+00:00 app[web.1]: app/middleware/flash_session_cookie_middleware.rb:16:in `call'
2012-04-24T19:27:06+00:00 app[web.1]:
2012-04-24T19:27:06+00:00 app[web.1]:
2012-04-24T19:27:06+00:00 heroku[router]: GET photos.kfring.com/photos/scan dyno=web.1 queue=0 wait=0ms service=44ms status=500 bytes=728
2012-04-24T19:27:06+00:00 heroku[nginx]: 74.92.73.117 - - [24/Apr/2012:19:27:06 +0000] "GET /photos/scan HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.163 Safari/535.19" photos.kfring.com
Using Google Chrome (IE works OK), I get a javascript error - Uncaught ReferenceError: BlogBuilder is not defined from plupload library. Occurs on pressing upload button and file upload does not start.
I have uploaded the app to heroku using the instructions etc (using the newer method of setting variables through the heroku command line rather than the config file). Upload and browsing works fine. As soon as I try to search I get the following error in my log (the same happens locally):
2014-03-07T11:10:58.716249+00:00 app[web.1]: Completed 500 Internal Server Error in 219ms 2014-03-07T11:10:58.717986+00:00 app[web.1]: 2014-03-07T11:10:58.717986+00:00 app[web.1]: NoMethodError (undefined method
parameterize' for nil:NilClass):
2014-03-07T11:10:58.717986+00:00 app[web.1]: app/models/album.rb:25:in ensure_path' 2014-03-07T11:10:58.717986+00:00 app[web.1]: app/controllers/albums_controller.rb:58:in
create'
2014-03-07T11:10:58.717986+00:00 app[web.1]: app/middleware/flash_session_cookie_middleware.rb:16:in call'
At commit 7c0b673, I get the following message after running bundler install.
Could not find rack-cache-1.6.0 in any of the sources.
local state:
$ grep rack-cache Gem*
Gemfile.lock: rack-cache (~> 1.2)
Gemfile.lock: rack-cache (1.6.0)
$ rails -v
Rails 3.2.22.2
local work-around:
$ rm Gemlock.file
$ bundle install
After changing to carrierwave the json does not return thumb url. Need to figure out a way to get url to the first photo thumb in album.
yum -y install zlib zlib-devel readline readline-devel libxml2 libxml2-devel libxslt libxslt-devel sqlite sqlite-devel
adduser -m ruby
passwd ruby
su ruby
echo "install: --no-rdoc --no-ri" > ~/.gemrc
curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash
. ~/.bashrc
rvm install 1.8.7
rvm use 1.8.7 --default
gem install bundler
git clone https://github.com/espen/balder.git
cd balder
bundle install
rake db:create
[ruby@ox balder]$ rake db:create --trace
rake aborted!
no such file to load -- openssl
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/authlogic-3.0.3/lib/authlogic/crypto_providers/aes256.rb:1:in require' /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/authlogic-3.0.3/lib/authlogic/crypto_providers/aes256.rb:1 /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/authlogic-3.0.3/lib/authlogic.rb:59:in
require'
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/authlogic-3.0.3/lib/authlogic.rb:59
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/authlogic-3.0.3/lib/authlogic.rb:6:in each' /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/authlogic-3.0.3/lib/authlogic.rb:6 /home/ruby/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in
require'
/home/ruby/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in require' /home/ruby/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in
each'
/home/ruby/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in require' /home/ruby/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in
each'
/home/ruby/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in require' /home/ruby/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.21/lib/bundler.rb:122:in
require'
/home/ruby/balder/config/application.rb:7
/home/ruby/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' /home/ruby/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
require'
/home/ruby/balder/Rakefile:4
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in load' /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in
load_rakefile'
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/application.rb:495:in raw_load_rakefile' /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/application.rb:78:in
load_rakefile'
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/application.rb:129:in standard_exception_handling' /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/application.rb:77:in
load_rakefile'
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/application.rb:61:in run' /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/application.rb:129:in
standard_exception_handling'
/home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/lib/rake/application.rb:59:in run' /home/ruby/.rvm/gems/ruby-1.8.7-p352/gems/rake-0.9.2/bin/rake:32 /home/ruby/.rvm/gems/ruby-1.8.7-p352/bin/rake:19:in
load'
/home/ruby/.rvm/gems/ruby-1.8.7-p352/bin/rake:19
Ricardo-Pachecos-iMac:balder ricardopacheco$ bundle exec rake db:migrate
(in /Users/ricardopacheco/Sites/balder)
rake aborted!
Command 'exiftool' not found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.