Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

PA Programming Thread :: PAdev.net - Need hosting for a service of yours? Check it out.

15556586061100

Posts

  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    Was talking with weretaco about getting Ruby on Rails setup and I'll just post this instead of replying:
    Apache doesn't run as root so mod_rails won't work correctly.

    I am running FastCGI for PHP. I can put RoR on that as well it seems, which may be the best bet for having an "admin-free" way to put up new apps on your established domains.

    It might be better for performance/memory to look at Mongrel, but that requires vhost configuration (reverse proxy to your server which you run) which means admin setup.

    I'm not experienced with it as I'm not a RoR developer so haven't had to hash it out before.

    Could use some advice on the best approach here. Ideally we have an environment where the rails application runs as the owner's uid (this is a requirement) and doesn't require any admin configuration to get it under username.padev.net vhost (preferable).

    It would be nice if someone can just create a new rails application under ~/rails/MYAPP/ or such, and then link ~/rails/MYAPP/public to /var/www/user.padev.net/MYAPP. If I'm understanding things wrong then point it out.

    I already am using FastCGI for PHP.

    I have RoR up and running, the demo application seems to be running fine (under WEBrick) but that has it under a non-80 port. I want to put this behind Apache vhosts for you guys.

    BTW, is there a reason you use Mongrel instead of this embedded WEBrick? It seems like they serve the same purpose, right? I am assuming Mongrel is better performing just, and either way I would reverse-proxy from Apache to the server port? (Which I want to avoid since that is Apache config you will have to get me to do.)

    Thanks guys.

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    FYI, from the default app I'm running:

    Ruby version 1.8.7 (i486-linux)
    RubyGems version 1.8.15
    Rack version 1.3
    Rails version 3.1.3
    JavaScript Runtime therubyracer (V8)

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • admanbadmanb the bored genie Seattle, WARegistered User regular
    WEBrick is slow; mongrel would be much better if it's not an unpleasant amount of extra config. Rails ran in production for years without mod_rails so I wouldn't be worried about that.

    twitter, github, resume/portfolio, if you like to play or host boardgames online, check out handtracker
  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    Yeah, I think it is mostly the same amount of config on the Apache end if you are running a back-end server, so Mongrel would be what we use if we go that route.

    Just wondering if dispatch.fcgi still is a thing, most guides are pretty old with it and it isn't setup by default in Rails 3, but apparently you can create and use it fine still.

    With the FastCGI method, I think I would be able to set it up in a way where you could do it on your own just creating the dispatch.fcgi and the .htaccess in your app/public directory, and then linking that into your webroot. Performance isn't terribly, although it seems to indicate it is less stable and finicky than a proper Mongrel backend (have to kill the FastCGI processes to "restart" etc.)

    The upside is that this is all doable from user space, you won't need root access or help. It could all be documented for our exact server.

    I might have to play with things, if anyone has a Rails app they could help test by migrating to our server please let me know.

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • zeenyzeeny Registered User regular
    You really should have gone the nginx + daemonize everything route. Would have made administration a fair bit easier.

    zeeny on
  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    I dove into Rails development and figured out how things work a bit better.

    Nevermind, I think I have it all working, under Passenger/mod_rails no less. :D

    I'll write up how to get an app linked in later.

    Infidel on
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    zeeny wrote:
    You really should have gone the nginx + daemonize everything route. Would have made administration a fair bit easier.

    How so?

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • WeretacoWeretaco Registered User regular
    Infidel wrote:
    I dove into Rails development and figured out how things work a bit better.

    Nevermind, I think I have it all working, under Passenger/mod_rails no less. :D

    I'll write up how to get an app linked in later.

    Awesome

    Thanks Infidel!

    bloodbar.gif
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • IncindiumIncindium Registered User regular
    Ha I just found out you can tunnel via SSH with Putty and use it as a web proxy. Sweet!

    I can't connect to PA forums from my XP netbook at home for some weird reason(gotta be something with U-verse it's firewall/router). But running it through a proxy should fix that.

    Also its a great dev debugging tool to be able to hit a website from an external source. Especially when you don't know if it's something with the local network setup causing an issue.

  • bowenbowen Registered User regular
    Yup, best thing ever.

    Also be careful some work environments have rules against that.

  • zeenyzeeny Registered User regular
    Infidel wrote:
    zeeny wrote:
    You really should have gone the nginx + daemonize everything route. Would have made administration a fair bit easier.

    How so?

    I meant going php-fpm, uwsgi, whatever the ruby equivalent is etc.
    I'm a big fan of nginx because of how easy it is to proxy anything through it....and because I've never felt comfortable enough with apache, despite using it for 10+ years.

  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    zeeny wrote:
    Infidel wrote:
    zeeny wrote:
    You really should have gone the nginx + daemonize everything route. Would have made administration a fair bit easier.

    How so?

    I meant going php-fpm, uwsgi, whatever the ruby equivalent is etc.
    I'm a big fan of nginx because of how easy it is to proxy anything through it....and because I've never felt comfortable enough with apache, despite using it for 10+ years.

    Yeah, I reverse proxy plenty with Apache. The Apache config is not what was giving me trouble, it is my ineptitude with Rails.

    Don't worry, I'm giving myself a crash course and apparently I can swim!

    http://www.padev.net/howto/ruby-on-rails

    Let me know if there are any problems with getting your Rails apps going, or anything I could add/clarify.

    Soooo glad I could get it working with Passenger. It was mostly my misunderstanding that was keeping me from using it from the get-go.

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    @Saeris

    I added that RoR as content type HowTo. I made the alias howto/ruby-on-rails. I would like for them to appear on the front page as they show up and drop off, and also have them indexed/linked by a page at /howto. Tell me how best to set this up, I think if I take it any further I'll do something retardo.

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • WeretacoWeretaco Registered User regular
    @Infidel

    What's the easiest way to upload files to the site? Is ftp running?

    bloodbar.gif
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • bowenbowen Registered User regular
    scp is a good way to do this weretaco.

    It uses ssh to transfer files similar to how FTP works.

    bowen on
  • WeretacoWeretaco Registered User regular
    Actually just tried SFTP in Aptana and it seems to be working fine.

    Good stuff :)

    bloodbar.gif
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • bowenbowen Registered User regular
    Loving being able to do FTP and SSH through a single service. SSH is pretty much the only thing I like having running.

  • WeretacoWeretaco Registered User regular
    now to figure out how to deploy a rails app from the dev machine at home to the server...

    bloodbar.gif
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • IncindiumIncindium Registered User regular
    SFTP works to carbon.padev.net if you have a shell account.

    Edit : Doh your dripping blood signature caused me to skip over your post I think.

    Incindium on
  • WeretacoWeretaco Registered User regular
    @Infidel

    OK, stuff is uploaded but i'm having library issues apparently.

    It wants to do a bundle install but I don't have permissions ( I assume you've been getting pestered about it trying to sudo me)

    @Incindium my sig is magical and you will respect it.

    bloodbar.gif
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • WeretacoWeretaco Registered User regular
    @infidel

    Looks like you may not have installed rubygems? http://docs.rubygems.org/read/chapter/3

    Also your messages are turned off so i can't ssh-hassle you :)

    bloodbar.gif
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    Gems are definitely in, and I'm running / getting setup as a user (not root) just fine.

    Might be some steps that you have to do as a fresh user to ruby/rails on our server, I'll try creating another user and get setup again.

    Gems is how I have Rails, Passenger, etc. all on the system.
    bowen wrote:
    Loving being able to do FTP and SSH through a single service. SSH is pretty much the only thing I like having running.

    Yep. SSH is literally all you need.

    There will never be FTP, especially one that is tied to unix accounts. Should this be more clear about SFTP in getting-started, or was it just not looked at? :D

    Infidel on
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • SaerisSaeris Chronogestaltist Trinity, New MexicoRegistered User regular
    Infidel wrote:
    @Saeris

    I added that RoR as content type HowTo. I made the alias howto/ruby-on-rails. I would like for them to appear on the front page as they show up and drop off, and also have them indexed/linked by a page at /howto. Tell me how best to set this up, I think if I take it any further I'll do something retardo.

    When new content is created, it can be automatically "promoted" to the front page. Under the admin menu's "Content Management -> Content types" settings for HowTo, for example, there should be a section titled "Workflow settings" where you can set it to default as "Published" (which just makes it viewable by non-admins) and "Promoted to front page" (which will list it on the front page). You can control the number of items on the front page, as well as the size of the preview, from the admin menu's "Content Management -> Post settings".

    As for an index at /howto, see if this helps. I think it applies to Drupal 6 but the concepts are general enough to be applicable.

    Nlgya.png
  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    Okay, looks like it is sane for the first bit Saeris. I'll look into how to setup my index/category pages.

    I'm used to Wordpress mainly.

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • bowenbowen Registered User regular
    Infidel wrote:
    Gems are definitely in, and I'm running / getting setup as a user (not root) just fine.

    Might be some steps that you have to do as a fresh user to ruby/rails on our server, I'll try creating another user and get setup again.

    Gems is how I have Rails, Passenger, etc. all on the system.
    bowen wrote:
    Loving being able to do FTP and SSH through a single service. SSH is pretty much the only thing I like having running.

    Yep. SSH is literally all you need.

    There will never be FTP, especially one that is tied to unix accounts. Should this be more clear about SFTP in getting-started, or was it just not looked at? :D

    I just glanced over it again, I didn't see it.

  • bowenbowen Registered User regular
    Oh wow there it is, yeah I'm blind. Maybe a separate section for SCP/SFTP ?

  • WeretacoWeretaco Registered User regular
    Error when I try and do a
    rails new TestRail


    create vendor/plugins/.gitkeep
    run bundle install
    Enter your password to install the bundled RubyGems to your system:
    weretaco is not in the sudoers file. This incident will be reported.
    Enter your password to install the bundled RubyGems to your system:

    bloodbar.gif
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • bowenbowen Registered User regular
    Yeah I'm getting the same message.

  • templewulftemplewulf Registered User regular
    I've been sans Internet for a few weeks. Can anyone summarize the padev site for me? Is this a shared machine? Are these VMs?

    Friend me: Twitter | Google+
    Invite me: XBox Live | PS3 | Steam
    Link to me: Number Sorter | Achievement Generator
  • bowenbowen Registered User regular
    It's a shared node that we can scale up/down and use for projects, web, whatever.

  • bowenbowen Registered User regular
    Something that would require $50 a month per person we can all pitch in and use about at the same pace for $5 a month. Until such a time the person outgrows the rest of the group and needs their own, at which point you have all of us to help.

  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    The $5/mo access is to a shared system (the "hub") and if you want to cover the costs I'll set up your own dedicated node with root access under our umbrella.

    In the latter, we're basically a support network for your Linode.

    edit: damn you bowen!

    Infidel on
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • bowenbowen Registered User regular
    Heyooo.

    On the weird side I just got an email for a webinar about moving practice management shit to the cloud. Which is an incredibly terrible idea I can't believe anyone would suggest such a thing. Webinars that is, but the cloud thing is like way more stupid.

  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    bowen wrote:
    Heyooo.

    On the weird side I just got an email for a webinar about moving practice management shit to the cloud. Which is an incredibly terrible idea I can't believe anyone would suggest such a thing. Webinars that is, but the cloud thing is like way more stupid.

    Funny, I just got one for Keeping Your Business IT Secure in 2012.

    I'll take a look at the Gems stuff when I'm home likely. The new user stuff anyway, I may try something to see if I can fix it without testing myself.

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • templewulftemplewulf Registered User regular
    I've never used Linode! I'm not quite sure what a shared node means; I assume that's multiple VMs on a single machine?

    And we (users of padev) are multiple users on our one VM?

    Friend me: Twitter | Google+
    Invite me: XBox Live | PS3 | Steam
    Link to me: Number Sorter | Achievement Generator
  • bowenbowen Registered User regular
    Think of it like shared web hosting all of us are on a single machine. Except you can do more than just web hosting. It's basically a VM, though, yes. And you can monitor ports available for you to use thanks to my php script (shameless plug).

  • InfidelInfidel It's not Infidel, it's INNNNNFIDELRegistered User regular
    templewulf wrote:
    I've never used Linode! I'm not quite sure what a shared node means; I assume that's multiple VMs on a single machine?

    And we (users of padev) are multiple users on our one VM?

    A node is a VPS. It is a server that can be scaled up or down in resources. It is one shared Linux system, so you do not have root but a general user account. Others share it.

    At least for our hub node. We currently have one node, a Linode 1024 at carbon.padev.net

    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Phalla discussion and Secret Santas :: PhallAX 2013
    Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • templewulftemplewulf Registered User regular
    Ah, gotcha. I'm just intermediate at Linux admin, so I'm not sure how that all works with multiple users.

    Are you running multiple apache daemons? Would I create a www root in my user folder and have you put a symlink somewhere else? Are you handling the site config files, or do we have access to a2ensite and the like?

    Friend me: Twitter | Google+
    Invite me: XBox Live | PS3 | Steam
    Link to me: Number Sorter | Achievement Generator
  • PhyphorPhyphor Registered User regular
    Can we get a svn client installed? I could probably get it for myself but it's probably simpler to grab a package

This discussion has been closed.