Moebooru/Rails 3, and more

After working on it for several weeks, finally it got to the point where it’s relatively usable. No more Bundler-on-Rails2 evilry and the fact that 3.0 branch is still supported.

The best part is the one above. Yes, Moebooru now runs on Rubinius/Puma. The only foreseeable problem is it uses Process.pid on file uploads which, when several people uploading (or working with) files at same time, the temporary filename will collide.

Though due to me aiming more for workable implementation instead of correct implementation, there are quite a lot legacy stuff still in there:

  • repeated_auto_complete doesn’t work in Rails 3 without vendoring or updating the gem itself  (and I did both since Bundler’s git functionality seems broken in Rubinius).
  • prototype_legacy_helper must be used since I haven’t had time to upgrade the *_remote functions (and still thinking how to do it).
  • verification gem since I haven’t upgraded the route and its functionality, which previously built-in in Rails 2.3 has now removed.
  • Unsightly lib/core_ext. Just look at evilry I have added to make it behave like 2.3-stable.

On the brighter side, now I can start cleaning up the code. Or upgrade all the way to Rails 3.2 ( ¬‿¬)

22 thoughts on “Moebooru/Rails 3, and more

  1. Would you create version of moebooru which will support 100% debian and will be easy for install? Maybe make script which would install everything what you need to run moebooru.

      • Ok, it’s nice. Now I want to install it on Ubuntu Server 12.04. Can I be sure it can run it?

          • Ok… I get stuck at “bundle exec rake db:migrate” and when I was making PostgreSQL db and super user, I didn’t and I still don’t know, what username and name of db I would use… It would be nice, if you tell me what db and super user name I must use. When I used bundle exec rake db:migrate, it didn’t work and it wrote “undefined method ‘[]’ for false:FalseClass. Is there any solution? ;( Thank you in advance.

          • Sorry, there was mistake in the documentation. Database must be loaded from db/structure.sql first (cat db/structure.sql | psql dbname) before doing rake db:migrate.

          • Almost everything runs nice now, just moebooru not 😀 When I used last command ( bundle exec unicorn ) it was loading and then it wrote this: Cannot find or read home/dragonx/moebooru/config/newrelic.yml. ;(
            When I tried sensible-browser localhost (or 127.0.0.1) it wrote: w3w: can’t load localhost. Moebooru is very nice project and I want to run it, but everywhen I get any stuck and this is at the end.. so it’s pity. Can someone help or suggest something?

          • if you actually read the message you should see that it’s listening on port 8080, not 80. Therefore it’s accessible from 127.0.0.1:8080

          • Yay! You’re the best! But anyway, if I tried, page loaded and show this: http://puu.sh/H4wa and now I don’t know, what to do with that… If I’m anoying, just write, I’ll stop spamming you, but thank you that you’re helping me:D

          • The permission was incorrect. `sudo chmod -R o+rX /var/lib/gems/1.91/` (read: allow everyone to read files and directories in directory
            /var/lib/gems/1.91)

          • Thanks, works perfectly 😉 But there is something ban with uploading pictures, I upload it and it won’t submit.

          • I think there’re some required directories which aren’t created automatically. Create following directories in directory public:

            – data
            – data/image
            – data/jpeg
            – data/preview
            – data/sample
            – data/search

          • Ok, thanks. Nothing I need now, works ;)) Thank you very very much.

          • Thanks, works perfectly 😉 But there is something bad with uploading pictures, I upload it and it won’t submit. Sorry for these spams… I thought i didn’t send it… bakabaka…:D

  2. Sorry… I didn’t read example files 😀 This is maybe problem 😀 I’ll try it later.

  3. Hey could you help me install moebooru on Ubuntu LTS 14.04.1
    I’m not an beginner but without documentation i’m stuck there really fast.
    Tried your script from 2012 but well seems like it’s broken can’t retrieve something.
    Would be really glad to hear back from you. I really want to get moebooru to run on my server so hopefully you can help me.

    Ninncore

    • describing the problem might be a good start. Make sure to familiarize yourself with common rails deployment steps first though.

      • Thanks for this fast reply, well to be honest i never worked with rails, going to take some steps tomorrow it’s quite late over here 2:04am. Well to be clear i don’t even know where to begin with so every help is gladly seen. For now i’m only having an Ubuntu LTS 14.04.1 with ISPConfig. Falling in sleep right now worked all the day so writing you tomorrow if i’m getting stuck.

          • unfortunately I’ve never seen that error. Though at least I think you need to set environment to production and precompile the assets.

  4. Well most of the errors i resolved myself with trial and error, and even resetting some stuff. At the end i was suffering from the java runtime like nodejs… so easy yet so hard. But it finally working! Yeah feels nice to get stuff finally working after some retries. Any possibility to switch the default port to :80? Or would ask you why it takes around 1.92s to build up the pages?

Leave a Reply

Your email address will not be published. Required fields are marked *