|
Use simple-navigation for nav - https://github.com/andi/simple-navigation - and cancan for authorization
|
# ? Apr 27, 2012 10:25 |
|
|
# ? May 15, 2024 02:27 |
|
We use simple-navigation on three of our apps and its versatile as hell.
|
# ? Apr 27, 2012 15:50 |
|
8ender posted:We use simple-navigation on three of our apps and its versatile as hell. I go out for beer with the current maintainer of simple-navigation now and again :P (mjtko, not andi)
|
# ? Apr 27, 2012 17:35 |
|
What libraries do you use for stemming? I've looked at Snowball-stemmer, but it tends to be unusable for general use, as it overstems the pretty much everything. For example, football -> footbal specifically -> specif verifications -> verif ...and those are just three words off the top of my head. I looked also at KStem, which seems to be less agressive, but it looks like nobody has ported it to Ruby yet. I'll probably do it myself tomorrow, if anyone doesn't have any better ideas.
|
# ? May 1, 2012 02:28 |
|
Baxta posted:Pushing a db is coming back with a timestamp error (postgres). Research has dictated that its because im using 1.9.3 and cedar stack only lets you push dbs from 1.9.2 for some unknown bullshit reason. Use PGBackups instead of db:push/puill. https://devcenter.heroku.com/articles/pgbackups#importing_from_a_backup Taps needs to die. It's a fantastic geewiz demo, but it has a lot of problems Also if you use the new heroku-postgresql:dev plan, you can just psql straight in and/or use pg_restore from your machine. Once everyone is on that, could probably switch push/pull to just use pg_restore under the covers.
|
# ? May 2, 2012 05:32 |
|
Any suggestions as far as load testing tools go? We had an issue the other day, our daily emails went out in the middle of the day instead of the middle of the night, and we got a huge traffic spike (from links in the emails). One of our apps has a dynamically generated menu, and the 'recipe of the day' and another similar link were being dynamically created instead of being cached. Combine 10,000 users trying to hit the site in a 20 minute period and a slow query to build the link and the site was basically unusable for a while. I'm going to start by giving this a read: http://guides.rubyonrails.org/performance_testing.html I was going to write a script that I can give a list of users/passwords to and have it login then click a few links, and run x amount of those per minute. I figure there's probably 10 tools out there that can do this already but it might be fun to write one. We've fixed that issue (and have a list of others from NewRelic data) but I'm pulling for hitting a production app with some traffic BEFORE we let customers go at it. It seems like the last 3-4 new applications we put on the server have had issues like this at launch.
|
# ? May 2, 2012 14:20 |
|
code:
After that I'll choose some links to randomly 'click' on, and that's all I really need to do (times a thousand)
|
# ? May 2, 2012 17:06 |
|
Bob Morales posted:Any suggestions as far as load testing tools go? We had an issue the other day, our daily emails went out in the middle of the day instead of the middle of the night, and we got a huge traffic spike (from links in the emails). One of our apps has a dynamically generated menu, and the 'recipe of the day' and another similar link were being dynamically created instead of being cached. Combine 10,000 users trying to hit the site in a 20 minute period and a slow query to build the link and the site was basically unusable for a while. You could try combining third party solutions such as NewRelic for the measurement and blitz.io for the dummy users. I don't think you're going to get blitz.io to do logins, but it's good for just brute force testing of your resources.
|
# ? May 3, 2012 18:35 |
|
It was pretty easy to do with mechanize:code:
* Take a CSV file of user, password, subdomain * Command-line options for number of total times to run and how many in parallel * Definition file for the site (our sites are similar but have evolved over the last 2-3 years and have slight changes)
|
# ? May 4, 2012 02:09 |
|
Have you looked at JMeter?
|
# ? May 4, 2012 05:46 |
|
Can anyone suggest a good Ruby book for someone who has a reasonable CS background and recent python experience but next to no ruby experience? I just took a job where I'm going to be doing a fair amount of it, and I like to have physical hard copies of a book or two when I'm trying to pick something up. e: just Ruby, not RoR. More Watir oriented than webdev oriented.
|
# ? May 8, 2012 15:00 |
|
Design Patterns for Ruby might be good if you're familiar with GoF stuff and would like to see how it's implemented in Ruby. It goes over syntax at the beginning but at a rate that would probably be appropriate for someone with other languages under their belt already.
|
# ? May 8, 2012 15:21 |
|
When I switched jobs and had to pick up Ruby, I was recommended the pickaxe book; worked very well for me: http://pragprog.com/book/ruby3/programming-ruby-1-9
|
# ? May 8, 2012 19:05 |
|
Steve French posted:When I switched jobs and had to pick up Ruby, I was recommended the pickaxe book; worked very well for me: As a .NET developer, I'm looking to get into some Ruby on Rails. If I get this book, are there any other Rails specific books out there worth it? Or are the online guides sufficient?
|
# ? May 10, 2012 14:01 |
|
If you do get a book make sure it's really recent. Even stuff that covers 3.0 won't have the asset pipeline which is pretty drat important. Rails is still moving really fast and some of the stuff that's written in the earlier books is flat out wrong now.
|
# ? May 10, 2012 14:28 |
|
prom candy posted:If you do get a book make sure it's really recent. Even stuff that covers 3.0 won't have the asset pipeline which is pretty drat important. Rails is still moving really fast and some of the stuff that's written in the earlier books is flat out wrong now. Yeah that's what I figured. I'll stick to stuff online and lots of googling... and you guys as well
|
# ? May 10, 2012 15:19 |
|
I don't know if I mentioned this before but I'm in the Rails mentor program and I'm always happy to help new/intermediate Rails developers work through their issues (although more often than not I'm going to send you to the docs). Feel free to hit me up.
|
# ? May 10, 2012 16:56 |
|
prom candy posted:If you do get a book make sure it's really recent. Even stuff that covers 3.0 won't have the asset pipeline which is pretty drat important. Rails is still moving really fast and some of the stuff that's written in the earlier books is flat out wrong now. The PragProg rails book is current for Rails 3.2, at least in ebook form. (Disclaimer: not a rails expert, for all I know the book has taught me many bad things.) I'd also whole-heartedly endorse the pickaxe book for general Ruby education.
|
# ? May 10, 2012 19:15 |
|
Doh004 posted:As a .NET developer, I'm looking to get into some Ruby on Rails. If I get this book, are there any other Rails specific books out there worth it? Or are the online guides sufficient? I wouldn't know, I only know Ruby, no Rails.
|
# ? May 10, 2012 19:34 |
|
Thanks for the tips guys. Amazon has the pickaxe book coming in on Saturday.
|
# ? May 10, 2012 21:09 |
|
I was watching Yehuda Katz's railsconf talk and he mentioned in passing that he has to sell consulting clients on why using rails is a good idea but he didn't go into details. What would be some good reasons you could provide to clients?
|
# ? May 15, 2012 00:13 |
|
Rapid development, large number of open source libraries, fairly large developer base, built-in security against common attacks.
|
# ? May 15, 2012 03:04 |
|
I'm afraid I don't really know how to ask for this properly, but here it goes. I would like to provide users with the ability to use different view layouts based on their user settings, what would be the best way to accomplish this? ( similar to what Facebook & twitter has done recently ) So far my google-fu has not produced many results, and after reading the API on layouts and templates I feel I may be missing something fundamental.
|
# ? May 20, 2012 02:15 |
|
Oh My Science posted:I'm afraid I don't really know how to ask for this properly, but here it goes. Edit: from the layouts and rendering guide code:
tima fucked around with this message at 06:12 on May 20, 2012 |
# ? May 20, 2012 06:09 |
|
If you want to use a specific view file rather than a layout you can mess around with render :template in your action. The themes_for_rails gem might be interesting to you as well.
|
# ? May 20, 2012 16:41 |
|
prom candy posted:The themes_for_rails gem might be interesting to you as well. This is exactly what I wanted, thank you!
|
# ? May 20, 2012 17:03 |
|
Yeah I just implemented it in a project I'm working on and I was really impressed with it. It's a bit of a pain to get working with the asset pipeline but once you get the folder structure right you're golden.
|
# ? May 20, 2012 17:36 |
|
Care to elaborate on that point? I haven't read the documentation yet, but if you can provide advice based on your hiccups it may save me some time. What was the proper folder structure?
|
# ? May 20, 2012 18:14 |
|
I've decided to push my rails app to github to start building my 'portfolio'. I created a yaml file with all my configuration settings (passwords, email addresses, secret keys, etc) and added it to my .gitignore so that it wouldn't get pushed to github - revealing my passwords, etc. My question: Now that git is ignoring my configuration settings, how do I successfully push app updates to Heroku without removing 'config.yml' from my .gitignore file? Removing my configuration file from .gitignore, telling git to start tracking my config.yml again, THEN pushing to Heroku? Seems like that would be WAY too complicated. There must be an easier way, right? What am I missing?
|
# ? May 21, 2012 04:13 |
|
plasticbugs posted:I've decided to push my rails app to github to start building my 'portfolio'. I created a yaml file with all my configuration settings (passwords, email addresses, secret keys, etc) and added it to my .gitignore so that it wouldn't get pushed to github - revealing my passwords, etc. For heroku you usually use environment variables instead of yml files, check out documentation for "heroku config" on how to add them to your heroku environment.
|
# ? May 21, 2012 10:20 |
|
Oh My Science posted:Care to elaborate on that point? I haven't read the documentation yet, but if you can provide advice based on your hiccups it may save me some time. I think it was something like code:
|
# ? May 21, 2012 16:14 |
|
I'm slowly going through Rails Tutorial Book and am enjoying it so far. The guide, and everyone else, recommends Heroku which sounds pretty awesome. My issue is that I have my own dedicated webserver that I used to run a bunch of my other stuff. It's running apache and a whole slew of other stuff that I just throw on there whenever I feel like it. Since I'd like to utilize what I have available, what sort of configuration do you think I should use to set up my production environment so I can deploy to there instead of Heroku? Doh004 fucked around with this message at 17:35 on May 21, 2012 |
# ? May 21, 2012 17:32 |
|
Doh004 posted:My issue is that I have my own dedicated webserver that I used to run a bunch of my other stuff. It's running apache and a whole slew of other stuff that I just throw on there whenever I feel like it. Since I'd like to utilize what I have available, what sort of configuration do you think I should use to set up my production environment so I can deploy to there instead of Heroku? Definitely check out Passenger: http://modrails.com/
|
# ? May 21, 2012 17:45 |
|
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.
|
# ? May 21, 2012 17:59 |
|
tima posted:For heroku you usually use environment variables instead of yml files, check out documentation for "heroku config" on how to add them to your heroku environment. This. Use Foreman locally and a .env file, read https://devcenter.heroku.com/articles/config-vars and http://www.12factor.net/config
|
# ? May 21, 2012 18:16 |
|
manero posted:Definitely check out Passenger: http://modrails.com/ This just got me really excited. Thank you!
|
# ? May 21, 2012 18:25 |
|
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 |
|
Anyone know how to manually install compass in a rails app? I want to mess around with Susy 1.0.rc.0 but it requires the alpha compass release v0.13.alpha.0. unfortunately they stripped regular compass of its rails integration starting in v0.12, and instead rely on compass-rails, which has not updated to the alpha release. Any ideas? I keep getting this error: File to import not found or unreadable: susy Never mind, found a release candidate of compass rails. Oh My Science fucked around with this message at 04:19 on May 22, 2012 |
# ? May 22, 2012 04:16 |
|
Pardot posted:This. Use Foreman locally and a .env file, read https://devcenter.heroku.com/articles/config-vars and http://www.12factor.net/config Thanks tima and Pardot. I'm looking into Foreman and .env now. EDIT: I successfully got Foreman running locally. I added all my config vars (which were spread across two separate yml files!) to one .env file in my root and added that to my .gitignore. Deleted all my config.yml files, committed, & pushed to Github painlessly. That's much better! Thanks guys! My Foreman Procfile is pretty empty web: rails s test: rspec I'm not too keen on the lack of color formatting in my terminal output after running rspec. Though I understand that can be fixed if I also install and configure Guard for autotests. For now, is there any way I can run rspec in pretty colors without Foreman, but still load in my testing environment variables from .env? I'm guessing no. What other things can I do with Foreman that might be useful? plasticbugs fucked around with this message at 08:00 on May 31, 2012 |
# ? May 22, 2012 05:19 |
|
|
# ? May 15, 2024 02:27 |
|
So I have 2 model types, Leagues and Players. Leagues can have Players, and Players can be in different Leagues. You can add players and leagues separately, but I'm trying to assign an already created player to the current league. Before I would just do League.find(params[:league_id]).players.create(params[:player]) to add players to a league, but that method doesn't help me much for existing players. Essentially what I want to do is just add into the join table that player with :player_id is now also in league :league_id. But I don't want a new entry in the player table. I haven't done Rails in a while so I'm blanking out here. Any help?
|
# ? May 31, 2012 09:49 |