|
TheFlyingDutchman posted:On that note, is there any good books out there for RoR? Yes, there's the online documentation, but sometimes a book does a bit more for me. Anyone have any suggestions? The book on Rails is probably "Agile Web Development with Rails", by Dave Thomas. It touches on almost every aspect of the framework, but since the community likes to talk about how they'd rather "run on edge," parts of it get outdated rather quickly. You'll also find yourself reading the very sparsely documented API docs online rather often, but there's a project to spruce that up as well.
|
# ¿ Aug 9, 2007 05:13 |
|
|
# ¿ Apr 29, 2024 06:56 |
|
Taliesin posted:What's that one blog about RoR where the guy is also a writer? why the lucky stiff, maybe?
|
# ¿ Aug 9, 2007 08:15 |
|
"./script/generate X foo -c" will add it to SVN as well, if you like saving three keystrokes v:)v
|
# ¿ Sep 30, 2007 00:32 |
|
burntoutjoy posted:@posts.empty? This is the best one right here. Short, concrete, and simple.
|
# ¿ Nov 19, 2007 21:43 |
|
Hop Pocket posted:Is there a way to disable SQL logging for some statements within Rails? I have an images table that I'm uploading somewhat large files to, and the SQL logging is causing all sorts of Terminal.app problems. I don't want to disable SQL logging completely in the development environment, but I would like to be able to not have it log those statement that are doing INSERTs into the images table. If you're putting them in their own column, I suppose you could use filter_parameter_logging, but that might not completely fit your needs. This might also cause problems if you have columns similarly-named to your image data column elsewhere in your models. The Journey Fraternity fucked around with this message at 07:09 on Nov 29, 2007 |
# ¿ Nov 29, 2007 07:07 |
|
Adolf Hitler posted:Oh my god, why doesn't Hobo support rails 2.3.2? I'm going to shoot myself in the head. Have you looked into its bleeding edge? According to their blog, they're prepping for a 1.0 release that might scratch your 2.3.2 itch.
|
# ¿ Apr 27, 2009 07:16 |
|
VirtualBox is pretty nice, I'd toss my vote in for that too.
|
# ¿ Jan 9, 2011 05:05 |
|
Mental Filler posted:I was really hoping this was the case and I was just an idiot but sadly it's the post that went wrong, it really is TestModule (and test_module.rb if that makes any difference). You still need to explicitly require the module. require 'lib/test_module' at the top of your controller.
|
# ¿ Dec 22, 2011 00:13 |
|
clockwork automaton posted:If anyone is in the Madison area or is interested in going to Madison Ruby Conf I will be there speaking and I have a $50 off coupon code for admission: lindseybieda. I will also be speaking at Steel City Ruby Conf which luckily is only $50, so no coupon necessary. Awesome, I'll be at SCRC with my coworker. I'd say it's a small world but there really are way too many SA members everywhere.
|
# ¿ May 21, 2012 19:50 |
|
etcetera08 posted:Not Rails-related, but since we don't have a Ruby thread.. I am having a weird thing where a Do you have another file in your load path named lastfm.rb that might be requiring the file with that line?
|
# ¿ Jun 23, 2012 22:08 |
|
If you're dropping the entire database to reseed it, why not just load the database from schema?code:
|
# ¿ Oct 16, 2012 17:36 |
|
I should also probably point out that you have three different things that rating could be referring to in the vote_for_user method. Even though you have a local var as one of the three and the other two aren't being referred to, it still would be confusing in the future when things don't work as expected.
|
# ¿ Nov 25, 2012 17:49 |
|
Physical posted:I'm using MySQL and my where clauses is changed to We've all had that happen. Plus side is that it's a learning experience!
|
# ¿ Jan 14, 2013 20:51 |
|
Physical posted:I still don't get what went wrong with code:
|
# ¿ Jan 14, 2013 21:20 |
|
Not sure how homebrew ruby adds executables from gems- have you considered rbenv?
|
# ¿ Jan 22, 2013 23:00 |
|
Lexicon posted:No kidding. Pardot - do yourself a favour and put Rails aside until you're comfortable with Ruby and universal programming constructs such as looping, objects, etc. I'm an experienced software engineer and I find Rails to be a big beast to handle at times. I want to quote this to keep it around.
|
# ¿ Jan 28, 2013 04:25 |
|
Bob Morales posted:Is there a way around adding a gem to your project and then having to run bundle install again? Just add the one new gem without using bundler? If you already have the gem installed, you should be able to just require it somewhere early on in your app.
|
# ¿ Feb 4, 2013 06:28 |
|
tef posted:
Must be Monday.
|
# ¿ Feb 11, 2013 20:07 |
|
http://rapgenius.com/James-somers-herokus-ugly-secret-lyrics Well, this certainly explains all the random timeouts we've been seeing for so long.
|
# ¿ Feb 14, 2013 02:41 |
|
*edit* I'm a moron
|
# ¿ Mar 7, 2013 04:20 |
|
mmachine posted:Having an issue with a form_for on a routes resource and Rails' automatic pluralization. I have a definition in my routes.rb that goes like this: Try tossing this in an initializer: code:
|
# ¿ Apr 25, 2013 16:25 |
|
plasticbugs posted:I know this is a really stupid question, but what the heck. https://rubygems.org/gems/uuid
|
# ¿ May 21, 2013 07:31 |
|
It doesn't help that there are multiple definitions. Most of the Ruby core/standard library treats it as an indicator that the method will not return anything and will modify its calling object directly. Rails tends to use it to designate that failure should raise an exception (at least in ActiveModel's viewpoint).
|
# ¿ Jun 11, 2013 21:27 |
|
raej posted:Maybe I need to step back and get an idea of the Ruby way to accomplish the task I want to accomplish. What they're trying to say is that cellar! is not a particularly good method for a User to have. If it were me, I'd be doing something like this: Ruby code:
This is completely off-the-cuff and I may have had a few beers. The Journey Fraternity fucked around with this message at 05:04 on Jun 13, 2013 |
# ¿ Jun 13, 2013 05:02 |
|
raej posted:I have a form for cellaring beers right now which looks like this: Your params bit is wrong. :year, :size, and :date are attributes on @cellared_beer, so you'd want something like this: code:
(or appropriate debugging gems but hell I'm still in printf mode)
|
# ¿ Jul 16, 2013 00:12 |
|
Smol posted:I'm using https://github.com/rails-api/active_model_serializers This is what I've preferred for simple ones as well, but I've found it falls over when you want more than one way of looking at the same model. I also didn't throw more than a few hours at trying to get it to work though, so
|
# ¿ Aug 21, 2013 16:21 |
|
Kallikrates posted:unless you run the auto rehash plugin theres going to be a couple Really should be built-in functionality, but what can you do? (happy rbenv user here, screw rvm)
|
# ¿ Aug 21, 2013 20:06 |
|
androo posted:Newbie question: I had trouble getting into RoR a couple years back after casually chatting with some web developers at the company I worked at. I found the path to "Hello, World" a bit too abstract and gave up shortly after. You should just use Heroku if you're getting started (http://heroku.com) for hosting. It'll take whatever Rails version you throw at it, and you get a dyno and small database instance for free.
|
# ¿ Sep 5, 2013 19:34 |
|
Newbsylberry posted:MailChimp looks like a good way to go! Thanks for the help. select_tag is its own standalone helper method- it isn't called on a form object. Drop the 'f.'
|
# ¿ Oct 13, 2013 20:38 |
|
KoRMaK posted:In Ruby, I have a ASCII-8bit stream that contains a xls workbook. I want to open the workbook via the Workbook gem, but it requires a file. Is there a way I can read the stream into a file object without actually writing it to disk? This link seems close to what I am trying http://stackoverflow.com/questions/5931263/memory-streams-in-ruby You could try wrapping it in a delegator that declares rewind as a noop.
|
# ¿ Nov 8, 2013 23:31 |
|
prom candy posted:The problem with Heroku is that the minimum monthly cost to get rid of the really long application spin-up time is like $36. The free tier is fine for testing stuff out but if your app is low traffic a person's initial request can take like 10s which the app spins up. You can get around that by adding the free tier of New Relic. It can be configured to use a heartbeat URL to determine if the server is still up. Since it pings the server more frequently than the dyno sleep time, it'll never sleep.
|
# ¿ Dec 14, 2013 22:11 |
|
prom candy posted:That's not really sustainable though, I think Heroku's free tier only works if people aren't artificially keeping their apps alive. They offer you a hair over 31 full days worth (750) of dyno hours for free. If they didn't want you using it they wouldn't offer it.
|
# ¿ Dec 15, 2013 09:19 |
|
Obsurveyor posted:That's not how businesses able to offer a free tier work. You will see the free tier quickly be replaced or the hours reduced if every free account starts using every single dyno hour of a month. Every single application that uses multiple dynos gets one of those for free all month. I've done this for multiple work projects that I want to stand up easily but do not require more than one process, like Hubot. I have yet to hear a peep. Salesforce has more than enough throwaway cash to earn that small bit of goodwill for one of the few products of theirs that people like. *edit* And this is the Ruby thread, not a Heroku one, so I'm going to stop this derail. The Journey Fraternity fucked around with this message at 18:32 on Dec 15, 2013 |
# ¿ Dec 15, 2013 18:28 |
|
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 |
|
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 |
|
Peristalsis posted:I have a download action in a controller that's giving me some trouble. send_file is a 'renderer' here.
|
# ¿ Jan 30, 2014 18:01 |
|
The Milkman posted:Welcome to the industry. I can't wait for a year from now when people want Angular devs with 4+ years of experience.
|
# ¿ Feb 4, 2014 03:00 |
|
Oh My Science posted:https://github.com/elabs/pundit is the new authorization kid on the block if you want to give it a shot. This actually looks pretty fantastic- I might try to use it in some of my stuff at work.
|
# ¿ Apr 17, 2014 23:13 |
|
He's on Ubuntu, but that doesn't mean he isn't terribly terribly wrong about his choice of version management.
|
# ¿ May 2, 2014 17:34 |
|
|
# ¿ Apr 29, 2024 06:56 |
|
Ravendas posted:No, it doesn't exit, it waits for user input. An example simple program would be a series of couts in a console like so: IO.popen also takes a block with a single argument, which links to stdin/stdout on in the child process. If your program is waiting on input, write whatever is necessary, then read the results. code:
This is bar coding and I don't have access to a windows machine anyway, but it seems like this is something you'd want.
|
# ¿ May 26, 2014 06:16 |