|
It really depends on what approach to multitenancy you want to take. If you're using scoping, you will need to make some sort of script that goes through the following steps:
If you're using schemas to seperate data, you could take a similar approach, but move tables to new schemas with ALTER TABLE after moving them over. In any case, it's not going to be a trivial migration and you should plan for some downtime when doing it. To be honest, if expanding beyond 5-10 sites seems like a possibility, and particularly if you want some interaction between different clients, I would probably look into using a library from the start. Getting apartment up and running really isn't all that complicated (set up a config file, and remember to use rake apartment:migrate instead of rake db:migrate and you're set.)
|
# ? Dec 5, 2011 15:58 |
|
|
# ? May 15, 2024 09:40 |
|
I'm heading to Seattle in mid-January, staying with friends and getting settled. I can't seem to find much about the area ruby-wise except Seattle.rb and a rails meet up. Can someone tell me what it's like around that area for rails and-or ruby work?
|
# ? Dec 5, 2011 17:50 |
|
NotShadowStar posted:I'm heading to Seattle in mid-January, staying with friends and getting settled. I can't seem to find much about the area ruby-wise except Seattle.rb and a rails meet up. Can someone tell me what it's like around that area for rails and-or ruby work? Send Eric or Ryan an email if you don't hear from seattlerb guys here. Trying seattlerb's hack night concept in Miami: http://www.meetup.com/miamirb/events/43260922/
|
# ? Dec 5, 2011 18:38 |
|
Be advised with the multi-schema approach: when you start getting into the several thousand relation (each schema gets its own copies of each table) range, pg_dump breaks and makes everyone sad.
|
# ? Dec 5, 2011 18:44 |
|
Is ActiveResource really as goddamn slick as it seems? Automatically map REST resources from an external API to models in my application?
|
# ? Dec 6, 2011 22:29 |
|
Deus Rex posted:Is ActiveResource really as goddamn slick as it seems? Automatically map REST resources from an external API to models in my application? Yes* *if you are consuming a public API from 37signals because nobody else uses ActiveResource.
|
# ? Dec 6, 2011 22:32 |
|
BonzoESC posted:Yes* what do you mean by this? as far as I can tell it doesn't require ActiveResource on the web service's end, just REST resources with JSON or XML representations. the big caveat I see to ActiveResource is that there's no baked-in OAuth support, and almost every interesting public-facing REST API (Twitter, Flickr) requires OAuth
|
# ? Dec 7, 2011 01:24 |
|
Deus Rex posted:what do you mean by this? as far as I can tell it doesn't require ActiveResource on the web service's end, just REST resources with JSON or XML representations. the big caveat I see to ActiveResource is that there's no baked-in OAuth support, and almost every interesting public-facing REST API (Twitter, Flickr) requires OAuth Every time I've used it's seemed like more work than just grabbing a gem for the service.
|
# ? Dec 7, 2011 14:44 |
|
Also the third option, HTTParty: http://httparty.rubyforge.org/ This gem is all sort of fun to use.
|
# ? Dec 8, 2011 08:11 |
|
So Heroku is deprecating "cron" in favor of daily, hourly, and decaminutely commands. Is there a good way to turn the hourly version of these into something cron-like, with day-of-week/day-of-month matching, de-repetition, etc.?
|
# ? Dec 9, 2011 22:23 |
|
BonzoESC posted:So Heroku is deprecating "cron" in favor of daily, hourly, and decaminutely commands. Is there a good way to turn the hourly version of these into something cron-like, with day-of-week/day-of-month matching, de-repetition, etc.? If you want super fine control, the best way is always going to be a clock process type in Procfile and something like clockwork. The obvious downside is that it's an additional dyno, so it's not free. If you're using the scheduler addon, and want something different than what it offers you have some tradeoffs. The important thing to keep in mind is that it makes it's best effort to call your app every [whatever] time period, but it can slip. So if you keep a table of job types and the next time they are supposed to run. Then have your scheduler process check for which ones have a date less than now, run them, and update their next time.
|
# ? Dec 9, 2011 22:36 |
|
Pardot posted:If you want super fine control, the best way is always going to be a clock process type in Procfile and something like clockwork. The obvious downside is that it's an additional dyno, so it's not free. code:
|
# ? Dec 9, 2011 22:57 |
|
Ruby had a reputation for being impractical to use on a Windows box because of lagging apis or whatever. Is that still true? If so, does Ubuntu keep pace fine?
|
# ? Dec 9, 2011 23:06 |
|
Adahn the nameless posted:Ruby had a reputation for being impractical to use on a Windows box because of lagging apis or whatever. Is that still true? If so, does Ubuntu keep pace fine? Ruby probably still sucks on Windows, but it's just fine on Ubuntu.
|
# ? Dec 9, 2011 23:15 |
|
BonzoESC posted:
That's pretty good, but it doesn't solve the issue if scheduler is down for an entire sunday. If instead you set the next time to run the weekly_mail task, when scheduler is back up on monday, you will know you still need to run that task. That said, it's extremely unlikely that scheduler would be down for an entire sunday but there is nothing special about scheduler—it's just a heroku app.
|
# ? Dec 9, 2011 23:17 |
|
Pardot posted:That's pretty good, but it doesn't solve the issue if scheduler is down for an entire sunday. If instead you set the next time to run the weekly_mail task, when scheduler is back up on monday, you will know you still need to run that task. Yeah, this is just a short-term thing; once we start doing recurring billing we'll probably move to clockwork or something else more robust.
|
# ? Dec 9, 2011 23:22 |
|
If you have any of the following problems:
And you are completely confused by the problem and the error codes don't make sense... Uninstall and reinstall XCode. A shameful amount of times, this has worked for me. Very frustrated with Apple right now; tying their compilers to the health of your XCode installation is absolutely painful, especially since my download speeds suck.
|
# ? Dec 15, 2011 23:34 |
|
Deus Rex posted:Is ActiveResource really as goddamn slick as it seems? Automatically map REST resources from an external API to models in my application? I spend more time fighting with ActiveResource than any other part of Rails. Of course, I'm trying to make it do crazy things like use non-numeric IDs. I have enough trouble getting it to work between two Rails apps, I wouldn't even bother trying it against a third party API.
|
# ? Dec 16, 2011 01:02 |
|
Nybble posted:A shameful amount of times, this has worked for me. Very frustrated with Apple right now; tying their compilers to the health of your XCode installation is absolutely painful, especially since my download speeds suck. http://speakerdeck.com/u/bryce/p/getting-started-with-ruby-and-rails The short version is: use http://git.io/osxgcc to install GCC, http://git.io/rbenv (and ruby-build) to install Ruby, Bundler to manage gems with your Rails projects, and http://pow.cx as your developer-mode app server.
|
# ? Dec 16, 2011 02:54 |
|
I've never understand why pow is useful
|
# ? Dec 16, 2011 02:58 |
|
Pardot posted:I've never understand why pow is useful My current customer has two apps that talk to each other. Whenever I cloned them from github, I just ln -s `pwd` ~/.pow in each one's folder, set the API_URL in the settings file of one of them, and that's pretty much it. It's easier for me to set up on a new machine than Passenger, does the right thing with rbenv (and tried to with rvm but wayne ), and tbqh I just like hitting a .dev url and having the app run.
|
# ? Dec 16, 2011 03:14 |
|
BonzoESC posted:http://speakerdeck.com/u/bryce/p/getting-started-with-ruby-and-rails I love you. Awesome info, all of it.
|
# ? Dec 16, 2011 03:15 |
|
Nybble posted:I love you. Awesome info, all of it. I actually tested all that in Ubuntu too. Not my first choice ( supremacy), but easily my second.
|
# ? Dec 16, 2011 05:03 |
|
Pardot posted:I've never understand why pow is useful I just use passenger plus the preference Pane. We have 20 apps and it's easier than starting whatever one I need to work on for five minutes. Drag and drop the folder of the project onto the pane and bam.
|
# ? Dec 16, 2011 06:01 |
|
I guess that's the answer, both to pow and passenger pref pane: You have several apps that you need running all the time. I just work on one at a time, so I don't need that. Does either of them support Procfile to get your workers, clock, etc, up and running too?
|
# ? Dec 16, 2011 06:13 |
|
Pardot posted:I guess that's the answer, both to pow and passenger pref pane: You have several apps that you need running all the time. I just work on one at a time, so I don't need that. No, but if you know node.js ( ) it wouldn't be that hard in pow.
|
# ? Dec 16, 2011 14:52 |
|
Does anyone know of a good gem for a mailing list? Ideally i'd love something that can be a forum and mailing list at once, so the list can be searched, but that might be a pipedream. I have something already setup like that using vbulletin and a mailing list integration plugin but it is disgustingly hackly and i'd like to move this site to pure rails in the future.
|
# ? Dec 17, 2011 19:22 |
|
8ender posted:Does anyone know of a good gem for a mailing list? I'd just use MailChimp for the mailing list, and maybe use some crummy blog plugin to put it on your site with comments and such. MailChimp does RSS-to-email if you want to push mails out with your blog editor.
|
# ? Dec 17, 2011 20:09 |
|
There are plenty of mailchimp gems. One of them must let you poll your subscriber list for search.
|
# ? Dec 17, 2011 20:29 |
|
atastypie posted:There are plenty of mailchimp gems. One of them must let you poll your subscriber list for search. I suspect he meant having the posts searchable(?), so you could just write a 15-minute blog and point thinkingsphinx or pg_search at it for searching, and mailchimp at it for RSS-to-campaign.
|
# ? Dec 17, 2011 22:37 |
|
I should clarify: I mean the type of mailing list where lots of people can contribute and it's mailed to everyone on the list. I know, old school, but these people are old and love their mailing lists. I'm trying to put together a community type website for them and jam a mailing list/forum onto it without reinventing the wheel.
|
# ? Dec 17, 2011 23:21 |
|
Amateurish RoR Q here: I'm trying to include a module called ModuleTest (lib/module_test.rb) in my controller by using pre:include ModuleTest
|
# ? Dec 18, 2011 01:58 |
|
BonzoESC posted:I suspect he meant having the posts searchable(?), so you could just write a 15-minute blog and point thinkingsphinx or pg_search at it for searching, and mailchimp at it for RSS-to-campaign. I don't read threads, I only post in them
|
# ? Dec 18, 2011 02:06 |
|
Need a refresher in object oriented programing. When working with spec, when am I supposed to use an "end" statement? Here is what I've been doing. describe "GET 'stuff'" do it "should have some stuff" do . . . end it "should have some more stuff" do . . . end it "should have the rest of the stuff" do . . . end end Is this the right format for end statements? Each "it should do" statement has an end, and the final end statement ends the description. Do I have it right?
|
# ? Dec 20, 2011 18:43 |
|
Yes. While I love rspec, it's exceedingly complicated, so I'd focus learning OO not from how rspec works, but the code you're testing. Treat the rspec as incantations for now. If you're interested though, the do..end placement doesn't have much to do with OO directly. Both describe and it are methods. They take one argument—a string that is the description—and a block. The block is code that is either surrounded by do...end or curly braces.
|
# ? Dec 20, 2011 18:49 |
|
Pardot posted:Yes. While I love rspec, it's exceedingly complicated, so I'd focus learning OO not from how rspec works, but the code you're testing. Treat the rspec as incantations for now. Ok, this clears things up a lot. I was overcomplicating rspec in my head as if, "It can't be this simple."
|
# ? Dec 20, 2011 19:01 |
|
Mental Filler posted:Amateurish RoR Q here: I'm trying to include a module called ModuleTest (lib/module_test.rb) in my controller by using Is it ModuleTest or TestModule?
|
# ? Dec 20, 2011 21:31 |
|
hepatizon posted:Is it ModuleTest or TestModule? 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).
|
# ? Dec 21, 2011 23:20 |
|
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 |
|
|
# ? May 15, 2024 09:40 |
|
The Journey Fraternity posted:You still need to explicitly require the module. So you have to require the file and then include the contents? That makes sense. The require works but trying to include TestModule causes the baffling error "undefined method `include'". I mean that seems like a fairly fundamental method to be missing, surely?
|
# ? Dec 22, 2011 16:10 |