|
Obsurveyor posted:I prefer sprinkle. Puppet and Chef are horrible nightmares to setup imho because they're designed for huge enterprise deployment, requiring a server just for managing recipes and such. I've been using Ansible for exactly this reason.
|
# ? Dec 17, 2013 02:07 |
|
|
# ? Jun 3, 2024 23:59 |
|
The Journey Fraternity posted:I've been using Ansible for exactly this reason. I've used Puppet extensively; we just started using Ansible for some other tasks in our environment and our devs/ops really like it. I'm not sold on the flexibility of it yet; where are the warts? It seems like it's really easy to poo poo up your Ansible repo with playbooks that rarely-if-ever get run, leading to configuration management rot and a crufty repo. But at least you don't have the "puppet problem" — a single server or two that control your entire environment and that you are deathly afraid of upgrading/changing for that very reason. But it's really cool to hear someone else in this thread is using Ansible. To bring this back to your original point, though, you are very correct: Use a configuration management system to build boxes. It's all well and good to say "I can just install nginx and unicorn and such by hand. It's so much quicker." But you will eventually either a) forget how you built said box, or more probably b) stop caring. It's important you provide someone else with the ability to replicate your work. Even if it's just future you.
|
# ? Dec 17, 2013 03:42 |
|
Dangerllama posted:To bring this back to your original point, though, you are very correct: Use a configuration management system to build boxes. It's all well and good to say "I can just install nginx and unicorn and such by hand. It's so much quicker." But you will eventually either a) forget how you built said box, or more probably b) stop caring. It's important you provide someone else with the ability to replicate your work. Even if it's just future you. Just because I enjoy playing devil's advocate, you do run a risk, if you rely on a configuration manager, that it goes out of flavor 1-2 years down the road and now you're locked into a configuration app that lacks support, lacks community involvement, and has been replaced by the new flavor of the month. Ansible came out last year. Chef in '09. Puppet is mature at '05. I hadn't even heard of Sprinkle. Then there's Docker/dokku that's just gaining traction and other "transportable environments." You can really get analysis paralysis looking at all these toolkits. Just be careful that you don't spend more time on deployment tools than you spend on development. The takeaway: learn how to do it yourself and once you can, do whatever the hell feels comfortable to you, be it using a configuration manager or continuing to do it by hand. This conversation completely changes in a large team environment. I would use a configuration manager there so you can get a consistent server with some guarantee of idiot-proofing.
|
# ? Dec 17, 2013 05:19 |
|
I know this thread is on its way out, but I was curious if anyone had used this guide to set up devise/omniauth for rails4: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview ? I know Kayakyakr recommended it earlier in the thread, but I couldn't get it to work in rails4. I am reinstalling devise and having another run, but if anyone knows of any issues or concerns I might run into I would love the help.
|
# ? Dec 30, 2013 23:55 |
|
Obsurveyor posted:I prefer sprinkle. Puppet and Chef are horrible nightmares to setup imho because they're designed for huge enterprise deployment, requiring a server just for managing recipes and such. Puppet is perfectly capable of managing a single machine, without a Puppet Master server. The way I'm using it right now is a shell script that bootstraps puppet on a naked server, grabs my manifests, and applies them. Puppet sets up a cron job to regularly pull and apply manifests from my github.
|
# ? Dec 31, 2013 01:14 |
|
more like dICK posted:Puppet is perfectly capable of managing a single machine, without a Puppet Master server. The way I'm using it right now is a shell script that bootstraps puppet on a naked server, grabs my manifests, and applies them. Puppet sets up a cron job to regularly pull and apply manifests from my github. It's still way, way too many moving parts compared to something like Sprinkle for my needs. If it's more than installing a gem, it's too much and you do have to do system level installation stuff for Puppet, which is a big "Nope!" from me.
|
# ? Dec 31, 2013 01:47 |
|
Obsurveyor posted:It's still way, way too many moving parts compared to something like Sprinkle for my needs. If it's more than installing a gem, it's too much and you do have to do system level installation stuff for Puppet, which is a big "Nope!" from me. You can install Puppet and Facter as gems and `bundle exec` everything if you prefer. And, as more like dICK has already mentioned, you can run both Puppet and Chef in masterless configuration (I'd actually recommend this configuration to people not managing thousands of nodes). But more to the point, why would you be averse to installing system-level stuff to…y'know…manage systems? You're going to have to do some minor amount of bootstrapping of any OS anyway. Installing one or two universally available packages shouldn't really be a problem. Where you run into trouble managing puppet/chef versions is when you've got hundreds of nodes that need upgrading; obviously not a problem if you're only managing a few nodes. And when you're managing hundreds/thousands…well, software patching is a problem you've going to have to have solved anyway. Not to be harsh, but taking a cursory look at Sprinkle, it sure looks a lot like just another "me too" ruby DSL. I don't see what it gives you over already existing options, other than maybe it looks more like pure ruby (though from experience, I'd argue that's not a benefit in the configuration management space, where non-rubyists will usually be playing along). Obviously in the end you should go with whatever you prefer. And again, I'd stress the only wrong answer is not to use configuration management of some sort. I just wouldn't not pick Chef or Puppet because they're too "enterprise" oriented, or require a server. Neither of those statements is true. waffle enthusiast fucked around with this message at 05:22 on Dec 31, 2013 |
# ? Dec 31, 2013 05:05 |
|
Any good tutorials on how to do performance testing/benchmarking for Rails? Right now I'm looking at using ruby-prof locally to test specific methods as suggested in the 411 railscast. Additionally I want to build a second app that pumps requests at specific url endpoints. Does that sound reasonable?
|
# ? Jan 1, 2014 16:14 |
|
Newbsylberry posted:I know this thread is on its way out, but I was curious if anyone had used this guide to set up devise/omniauth for rails4: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview ? I know Kayakyakr recommended it earlier in the thread, but I couldn't get it to work in rails4. I am reinstalling devise and having another run, but if anyone knows of any issues or concerns I might run into I would love the help. Didn't get to work on the new thread over the break. That should be working with rails 4, is there anything in particular that it's giving you an issue with?
|
# ? Jan 3, 2014 01:11 |
|
This may not be the right thread, but I decided to pull the trigger with Digital Ocean and set up a Dokku Ubuntu install for a server to mimic a Heroku like Ruby on Rails environment. Does anyone have any experience with this? Ideally I'd like to be able to git push to my DO droplet and BAM everything works. raej fucked around with this message at 03:49 on Jan 5, 2014 |
# ? Jan 5, 2014 02:44 |
|
kayakyakr posted:Didn't get to work on the new thread over the break. I am getting the pretty common error: Authentication Failure! invalid_credentials: OmniAuth::Strategies::OAuth2::CallbackError, OmniAuth::Strategies::OAuth2::CallbackError I have tried setting omniauth-facebook at version 1.4, and some of the other common solutions seen on Stack Overflow, but they aren't working for me. Edit - I am also wondering if people have a certain "protocol" they follow for writing methods or code they aren't familiar with (everything for me) in order to make it more manageable and possible to break it into parts? Newbsylberry fucked around with this message at 15:49 on Jan 5, 2014 |
# ? Jan 5, 2014 15:28 |
|
Newbsylberry posted:I am getting the pretty common error: I've had issues with facebook's oauth and working with my localhost, could that be something? I know that it isn't a Rails 4 issue as I have omniauth and devise working fine. Maybe try debugging in your callback and see what facebook is sending you?
|
# ? Jan 5, 2014 18:04 |
|
kayakyakr posted:I've had issues with facebook's oauth and working with my localhost, could that be something? I know that it isn't a Rails 4 issue as I have omniauth and devise working fine. I am testing it on a deployed server, so it's not the localhost issue. It's the callback phase, but I don't know what I need to change. This is the output from the server: code:
code:
code:
|
# ? Jan 8, 2014 05:23 |
|
Rails generates a 404.html file to use for all 404 errors. Is there a good way to get this file to use bootstrap? I'd like it to have the same look and feel as the rest of the site without adding a lot of bloat/redundant styling.
|
# ? Jan 9, 2014 00:33 |
It's been a while since I used a stock rails 404 page, is it located in the public/ directory?
|
|
# ? Jan 9, 2014 01:18 |
|
A MIRACLE posted:It's been a while since I used a stock rails 404 page, is it located in the public/ directory? Yes, yes it is! Is there a better way to specify 404 pages elsewhere?
|
# ? Jan 9, 2014 01:24 |
|
raej posted:Rails generates a 404.html file to use for all 404 errors. Is there a good way to get this file to use bootstrap? I'd like it to have the same look and feel as the rest of the site without adding a lot of bloat/redundant styling. You could use a rescue_from in your application controller to go ahead and render a 404 using your application layout. Something like this: https://gist.github.com/Sujimichi/2349565
|
# ? Jan 9, 2014 01:25 |
|
So I have a rake task that starts:code:
rake do_stuff['1,2,3','true'] The problem that I run into is that it takes args[:list_of_ids] to be '1' and args[:flag] to be '2'. I don't know how to change this.
|
# ? Jan 11, 2014 00:36 |
Google is your friend http://stackoverflow.com/questions/12055877/how-can-i-pass-an-array-as-an-argument-to-a-rake-task The simple thing is to just use whitespace delineation instead of commas, then call .split(' ') or whatever on the first argument to get your array
|
|
# ? Jan 11, 2014 00:43 |
|
Anyone running Dokku on Digital Ocean know why I would be getting a "502 Bad Gateway NGINX 1.4.3" error when I push to it, yet the app deploys fine on Heroku? NGINX log file shows this: 2014/01/10 01:56:32 [error] 2376#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <my.ip.add.ress>, server: app.campbellscoop.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:49153/", host: "app.campbellscoop.com raej fucked around with this message at 01:32 on Jan 11, 2014 |
# ? Jan 11, 2014 00:58 |
|
Is your application server running on port 49153?
|
# ? Jan 11, 2014 02:24 |
|
Pardot posted:Is your application server running on port 49153? I ran docker ps and got this code:
|
# ? Jan 11, 2014 19:24 |
|
I didn't see this in the OP but I'd like to learn more about making web apps with rails. I've only done scripting language work for little automation tools. I learn best through books - is there a book that covers everything after an idea all the way up to a finished web app? EDIT: Thank you so much! VVVVVVVVVVVVVVVVVVVVVVVV Mad Wack fucked around with this message at 22:35 on Jan 13, 2014 |
# ? Jan 13, 2014 22:26 |
|
Mad Wack posted:I didn't see this in the OP but I'd like to learn more about making web apps with rails. I've only done scripting language work for little automation tools. I learn best through books - is there a book that covers everything after an idea all the way up to a finished web app? I liked Michael Hartl's tutorial, but I'm not sure if there's something better now. The online book is free, there's a video series you can buy if you like.
|
# ? Jan 13, 2014 22:32 |
|
I am trying to use radio buttons and can't get them to work: This works locally but when I deploy the checkboxes don't even show up on the site: code:
code:
Edit - Alright, even though the checkboxes aren't showing up I can still select the drink_type, so I think it's the style sheets, I'm pretty sure I can figure this out. Amazing, thanks! VVVVVVVVVVVVVVVVVVVVVV Newbsylberry fucked around with this message at 04:15 on Jan 15, 2014 |
# ? Jan 15, 2014 02:46 |
|
Newbsylberry posted:I am trying to use radio buttons and can't get them to work: You should check out app/assets/stylesheets/myFridge.css:119-121
|
# ? Jan 15, 2014 03:08 |
|
I really really enjoyed mhartl's rails tutorial. The problem is it's so good that it makes the Agile Web Development in Rails book look like utter poo poo. Not only does it use scaffolds, but a fair amount of the code isn't explained very well. So I'm trying to make a shopping cart from scratch like the book does, but I can't seem to find any good tutorials for Rails 4 that aren't just copy/pastes from the Agile book. Any ideas?
|
# ? Jan 16, 2014 18:18 |
|
What is the preferred way to import csv files to populate a database in rails? The Railscast is so old, Roo just craps itself with a NameError and Unitialized Constant. I checked stackoverflow and found this but it still didn't solve the error, so I don't mind looking at another solution and starting from scratch. Also, the CSV files are rather large, one if ~40k entries, the other is ~200k entries, so Roo wouldn't be a good option anyway.
|
# ? Jan 16, 2014 20:32 |
|
I'd like to alter the "rails generate Scaffold MyModel" behavior. I need to make changes to the way models and controllers are spit out in addition to creating some new view files beyond the standard index/form/edit/show. As a plus, it would be nice if I could also alter an existing model to add a relationship clause to the new Scaffold-ed model. I read this top to bottom http://guides.rubyonrails.org/generators.html#first-contact but it hasn't fully clicked and I can't find an implemented example. I'm looking around in my railities folder and think I probably will copy those files for a start. I'd like to add this behavior in addition to the default scaffold behavior so I can chose when I want to use it. e.g. rails generate Scaffold and rails generate MyScaffold would both work. Is this possible?
|
# ? Jan 16, 2014 20:40 |
raej posted:What is the preferred way to import csv files to populate a database in rails? The Railscast is so old, Roo just craps itself with a NameError and Unitialized Constant. Is this a one-time thing? Just script it with the CSV class and the Sequel gem. If it's going to be a common seed thing, use db:seed and refer to the documentation
|
|
# ? Jan 16, 2014 21:07 |
|
raej posted:What is the preferred way to import csv files to populate a database in rails? The Railscast is so old, Roo just craps itself with a NameError and Unitialized Constant. Write a 5 line script yourself. There is a CSV parser in the standard library. Smol fucked around with this message at 23:15 on Jan 16, 2014 |
# ? Jan 16, 2014 22:09 |
|
Smol posted:Write a 5 line script to do that yourself. There is a CSV parser in the standard library. And even if Googling suggests FasterCSV, don't use it unless you're on Ruby 1.8. 1.9 and later have merged in FasterCSV and some additional improvements. Stdlib CSV is what you want.
|
# ? Jan 16, 2014 22:30 |
CSV class isn't even that necessary if all you're going to do is iterate over a .split call
|
|
# ? Jan 16, 2014 22:37 |
|
I would like to pre-populate a form using a previous pages form values, what's the best way to approach this in rails?
|
# ? Jan 17, 2014 08:53 |
|
Oh My Science posted:I would like to pre-populate a form using a previous pages form values, what's the best way to approach this in rails? If they're values off of an object, build that object each step along the way with the params you have and use form_for. so it would go: new (build blank object) -> details (build object with params from new) -> create (create object with combined params)
|
# ? Jan 17, 2014 08:59 |
|
Is there a better guide to publishing gems than this: http://guides.rubygems.org ? I have a bit of stuff I'd like to throw up but I'm not sure if that one is out of date or if there's another one that is preferred.
|
# ? Jan 17, 2014 15:03 |
|
What are you using in Rails 4 for authorization? We use (love) CanCan in Rails 3, but the official gem doesn't have Rails 4 support...
|
# ? Jan 17, 2014 17:38 |
atastypie posted:What are you using in Rails 4 for authorization? We use (love) CanCan in Rails 3, but the official gem doesn't have Rails 4 support... It's not like CanCan is that complicated, be sure to check the source but I don't see why it would be an issue
|
|
# ? Jan 17, 2014 17:45 |
|
atastypie posted:What are you using in Rails 4 for authorization? We use (love) CanCan in Rails 3, but the official gem doesn't have Rails 4 support... I've been using cancan in rails 4 without issue. Rails 4 was really not a huge change. It was mostly to deprecate a bunch of old features and force people onto a ruby > 1.9. e: I know I started on a new thread, but the holidays and a project got in the way of me working on that. I just wrapped up that other project, but I'm starting a new project today. Still, I'll try to do some stuff. I'm going to do this section-by-section, first up is Tutorials. Please give me your best learning Ruby tutorials. That's Ruby, Rails, Sinatra, Rack, Rake, anything that you'd like to point people to. So far, I have: tl;dr: post up tutorials for the new OP. e2: Reminder, you can help directly by writing in this document kayakyakr fucked around with this message at 19:37 on Jan 17, 2014 |
# ? Jan 17, 2014 19:23 |
|
|
# ? Jun 3, 2024 23:59 |
|
I've designed some simple Ruby objects to model a problem and I like the way they're composed. I'd like to use them as the backend for a Rails app and persist the data to a database. How can I integrate this design into rails without having to make these classes inherit from ActiveRecordBase and tangle them together with the RailsWay of doing associations? Is that really the way to go? Ideally, I'd like to integrate this in a way such that the objects, at most, have some other object that they persist themselves to. I don't want to uglify this with Rails code. HALP!code:
code:
code:
code:
code:
|
# ? Jan 18, 2014 14:06 |