|
This may seem like a stupid question, but how do I correctly configure database.yml? I am giving RoR development under Windows a shot, and previously I recall that the only bit of configuration I had to do was set my password to access MySQL. Now all I get is this as the default:code:
|
# ? Dec 23, 2007 20:25 |
|
|
# ? May 14, 2024 08:30 |
SpaceNinja posted:This may seem like a stupid question, but how do I correctly configure database.yml? I am giving RoR development under Windows a shot, and previously I recall that the only bit of configuration I had to do was set my password to access MySQL. Now all I get is this as the default: Call rails with '-d mysql' now. I think this is a bug, because just calling rails says that mysql is the default database, but we're ending up with a sqlite configuration.
|
|
# ? Dec 23, 2007 20:55 |
|
shopvac4christ posted:Call rails with '-d mysql' now. I think this is a bug, because just calling rails says that mysql is the default database, but we're ending up with a sqlite configuration.
|
# ? Dec 23, 2007 21:07 |
|
shopvac4christ posted:Call rails with '-d mysql' now. I think this is a bug, because just calling rails says that mysql is the default database, but we're ending up with a sqlite configuration. Not a bug, it's the new default, mainly because it's easier to set up. Also, sqlite3 is installed by default on Mac OS X, which a whole lot of rails developers use.
|
# ? Dec 23, 2007 22:46 |
Thoom posted:Not a bug, it's the new default, mainly because it's easier to set up. Also, sqlite3 is installed by default on Mac OS X, which a whole lot of rails developers use. Then there's a bug in the documentation: code:
|
|
# ? Dec 23, 2007 23:59 |
|
What hosts are you internet dudes using for your rails stuff?
|
# ? Dec 24, 2007 03:00 |
|
dustgun posted:What hosts are you internet dudes using for your rails stuff? I'm using Joyent. I don't have a good frame of reference, as I'm fairly new to Rails and that particular world, but I will say that I have found their support to be really helpful and responsive.
|
# ? Dec 24, 2007 04:43 |
|
I'm using railsmachine, who are a VPS host specialized around rails. They have a gem (called railsmachine) that makes it super quick and easy to deploy using capistrano--it is literally less than 5 minutes to run everything your first time though, even if you've never used capistrano or svn before. The few support issues I've had have had quick responses. I've even sent some non hosting related questions and gotten responses I would recommend looking into them if you want to have your own server to maintain at a reasonable price.
|
# ? Dec 24, 2007 05:49 |
|
It's just all so expensive for something that I'm not sure will last Hop Pocket posted:I'm using Joyent. I don't have a good frame of reference, as I'm fairly new to Rails and that particular world, but I will say that I have found their support to be really helpful and responsive. Railsmachine looks to be way out of my price range right now, at any rate.
|
# ? Dec 24, 2007 06:11 |
|
i use slicehost and apisnetworks. both are great rails hosts.
|
# ? Dec 24, 2007 09:48 |
|
I'm using Media Temple and Slicehost. Media Temple is certainly nothing worth writing home about and are great if you're looking for a premium host for your e-mail and Typo installation. Slicehost has been amazing. I think they still have a waiting queue for new sign-ups, but once you're in the service and support offered by all the guys is great. Plenty of help from the community and lots of stuff to help you set up a Ruby on Rails stack with them quickly. Unless you're going with Joyent's Accelerator, stay far away from them. They're formerly known as TextDrive, and while being the official Ruby on Rails host, they have terrible service and support.
|
# ? Dec 24, 2007 10:33 |
|
By the way, i have a slicehost account that is barely used, so if anyone has any interesting rails projects they'd like to host let me know via PM or email (me at jonnii dot com) and i'll possibly host it for you for free.
|
# ? Dec 24, 2007 11:06 |
|
dustgun posted:Railsmachine looks to be way out of my price range right now, at any rate. This caught me by surprise because when I was looking for hosting a year+ ago it was a fairly cheap VPS. Thinking back I believe slicehost had a 3+ month wait for hosting, which may be why I never went with them in the first place. Right now I'm paying $55/month MORE than a comparable server at slicehost, which kind of sucks. The major advantage with railsmachine is that you can hit the floor running, as the server is preconfigured with rails, apache, mongrel, etc. The railsmachine gem is awesome as well and makes it easy to deploy any number of applications. Slicehost can sort of match this using deprec (cap install_rails_stack) but I don't have any experience using it. Looks like it does everything I would need, though. Other than the the pain of moving hosts, I can't think of a reason to stick with railsmachine. I guess 'if it aint broke dont fix it' is a pretty good reason, and if there were no cost savings I wouldn't switch. However I would save just over $1000/year and that's pretty motivating. I do still love railsmachine. Hosting with them has been awesome and I would recommend them if you don't want to deal with setting up your own rails stack. I had previously been hosting at railsplayground, and that was a shared hosting nightmare of fcgi and missing gems. Anyone here with a slicehost account interested in a referral? Send me a PM or post in the thread and you can have it. I'll need your account email address, and you'll get a rebate on your next bill. hmm yes fucked around with this message at 12:36 on Dec 24, 2007 |
# ? Dec 24, 2007 12:33 |
|
atastypie, see my post above
|
# ? Dec 24, 2007 12:45 |
|
dustgun posted:It's just all so expensive for something that I'm not sure will last Someone above alluded to this before, but there are two different types of Joyent accounts.. The shared hosting (which I think is called their Shared Connector / Accelerator, formerly known as Textdrive), and then the virtual dedicated hosting, aka Accelerator. The latter gives you the ability to upgrade to more guaranteed memory / cpu / burst when necessary. No such guarantees are really given for the shared hosting. To be honest, I have sites running on both the virtual dedicated and the shared environments. The shared environment is a bit flakey. It tends to go down more frequently than I would like. However, I don't have any such problems with the virtual dedicated server.
|
# ? Dec 24, 2007 14:46 |
|
Looks like I'll probably sign up for a year of the base Accelerator package on Wednesday, unless something better comes around -- $45 for what they offer isn't bad or anything, I just wish it had more bandwidth.
|
# ? Dec 24, 2007 15:35 |
|
If you're after more Rails hosts and reviews check out https://www.railshostinginfo.com.
|
# ? Dec 24, 2007 15:53 |
|
Joyent tend to push people to BingoDisk (their S3-alike) for asset hosting. They say unlimited bandwidth, and I know that's always a loaded statement, but in my experience with TxD/Joyent I can't see them being unreasonable with it. Maybe they could clarify. Shared Accelerators are nothing special, but standard Accelerators are awesome if you're down with Solaris.
|
# ? Dec 24, 2007 15:56 |
|
I've got an SQL question as it pertains to RoR. I'm reading Ruby for Rails, and this particular set of instructions has left me somewhat . It says:quote:Adding records to the database code:
|
# ? Dec 24, 2007 21:23 |
|
Does anyone know how to get the current session id? I have a filter that I'm using to audit the controller name, action name, and request parameters. I'd like to add a session id as well.code:
code:
Ideas?
|
# ? Dec 24, 2007 21:47 |
|
Hop Pocket posted:Does anyone know how to get the current session id? code:
|
# ? Dec 24, 2007 22:35 |
|
Edit: nevermind
|
# ? Dec 24, 2007 22:36 |
|
SpaceNinja posted:I've got an SQL question as it pertains to RoR. I'm reading Ruby for Rails, and this particular set of instructions has left me somewhat . It says: I'm guessing the store_ is just the naming scheme he is assuming you are using, e.g. your app is store, so your dbs would be store_dev, store_test, store_production or w/e. Those sql statements are just adding test data to play with.
|
# ? Dec 24, 2007 22:37 |
|
That's what confuses me. The naming convention that he adopted for this project and the database schema earlier in the chapter was r4rmusic1_. But assuming that this is the case, how exactly do I add the data to the database? I know how add tables and so forth from a command line by calling a SQL file (mysql -u root -p < file.sql), but how do I specify what schema to add data to?
|
# ? Dec 24, 2007 22:41 |
|
I may have missed it in this thread, but does anyone know if Ruby 2.0 has addressed the performance issues? Ruby was designed initially for running short scripts and not long running processes like web servers, etc. There had been talk of some re-architecture under the hood to make it more like Perl (virtual machine, etc). I've been tracking some of the other projects like JRuby but they don't quite seem there yet.
|
# ? Dec 26, 2007 02:39 |
|
Ruby 2.0 isn't out yet, but from what I've read they've put a lot of effort into addressing the performance related issues.
|
# ? Dec 26, 2007 02:53 |
|
blargle posted:I may have missed it in this thread, but does anyone know if Ruby 2.0 has addressed the performance issues? Edit: YARV is in Ruby 1.9 by the way, whose release just happens to have been announced today. skidooer fucked around with this message at 05:38 on Dec 26, 2007 |
# ? Dec 26, 2007 05:25 |
|
Keep in mind that 1.9 is a development release, not intended for production. Check out Ruby 1.9 right for you? On the issue of VMs, there are a few alternate ruby VMs being worked on http://rubini.us/ - talk at rubyconf http://jruby.codehaus.org/ http://www.ironruby.net/ They're all a little rough around the edges, from what I hear. I admittedly haven't tried any of them. However, rubinius seems the coolest, as it tries to be written in ruby itself as much as possible.
|
# ? Dec 26, 2007 08:20 |
|
SpaceNinja posted:That's what confuses me. The naming convention that he adopted for this project and the database schema earlier in the chapter was r4rmusic1_. But assuming that this is the case, how exactly do I add the data to the database? I know how add tables and so forth from a command line by calling a SQL file (mysql -u root -p < file.sql), but how do I specify what schema to add data to? The mysql binary takes the name of a database on the command line. If you had those SQL statements in file.sql as they are in your quote: mysql -u root -p r4music1_development < file.sql Would add the data to the "composers" table in the r4music1_development database. In fact, if you didn't specify a database (by running the command mentioned in your post), the mysql client would barf and tell you that you didn't have a database selected unless your .sql file had a "USE <databasename>" statement or your inserts explicitly specified a database ("INSERT INTO r4music1_development.composers..."). EDIT: I'm assuming that what you mean by "schema" in your post above is "database" in the mysql sense. If you're saying the book had you create tables named like r4rmusic1_composers and now gives you example sql like "INSERT INTO composers", then you have to edit the file to have the right table names, but then your question would make less sense. brae fucked around with this message at 02:39 on Dec 27, 2007 |
# ? Dec 27, 2007 02:35 |
|
Ah okay. Thanks for the help. I actually sorta muddled through it by adding a USE r4rmusic1_development to the .sql file and then ran it in the MySQL query browser. It spat out some errors about duplicate entries for some reason, but everything seemed to have worked like it should. Speaking of which, can anybody recommend a better MySQL browser under Windows? The query browser that comes with the GUI tools is frustratingly crappy.
|
# ? Dec 27, 2007 03:52 |
|
How do I check my app's compatability with Rails 2? I was under the impression that 1.2.6 would show deprecation warnings, however, uhh... where does it show them? I can't find anything in the development.log or in the command line server output.
|
# ? Dec 27, 2007 05:18 |
|
SeventySeven posted:How do I check my app's compatability with Rails 2? I was under the impression that 1.2.6 would show deprecation warnings, however, uhh... where does it show them? I can't find anything in the development.log or in the command line server output. That's a good thing sir. It puts them to the development console/log. Depreciation stuff includes, using Array.concat calls without brackets, and various other minor things. It's designed to be forwards compatible, so not everyone's going to get depreciation warnings. I've got a fairly large/complex system and I'm only getting 1 or 2 total.
|
# ? Dec 27, 2007 07:01 |
|
I thought stuff that has been moved to plugins (pagination, some javascript helpers which I'm using) would show deprecation warnings. They're certainly noted as such in the documentation.
|
# ? Dec 27, 2007 07:46 |
|
I'm a little scared that Ruby makes classes open:code:
|
# ? Dec 27, 2007 19:50 |
|
Heffer posted:If I add in someones library to get their functionality, do I run the risk of them mucking up some low-level classes like Fixnum? That feels a little dangerous to me. It's more of a problem in theory than in practice. The flexibility it allows is worth the ability to blow your foot off with it.
|
# ? Dec 27, 2007 20:16 |
|
Like ikari said, it's more of an "in theory" thing. No one in their right mind fucks around with the low level stuff, and if someone did in a widely distributed library, there would be a hell of an uproar about how stupid they are. In practice, open classes are fantastic and make so many things so simple.
|
# ? Dec 27, 2007 20:36 |
|
I'm just getting into ruby on rails and I've run across two things that bug me with scaffolding: 1) ":scaffold" is now broke or removed or something with Rails 2.0. Now you are supposed to use the "./script/generate scaffold ModelName" to generate a scaffold, which works fine apart from having its syntax changed (I think). The problem with this is that every worthwhile ruby tutorial is broke on steps 1 or 2, making it hard to learn right now. 2) You have to type in every variable and variable type on the command line to have it generate those fields for the scaffold. I had a pre-existing table in the database, and the schema was already loaded into the ruby file, and then I had to painstakingly match those up with what I typed. Is there a way to get script/generate scaffold to automatically figure it out? As I'm still picking up RoR I havent figured out how a URL is routed to a specific view. I see the default routes in routes.rb, and I see the scaffold generated commands in the controller, and the samples in routes.rb are a little sparse to understand what its actually doing. Is there a good guide to modifying routes.rb?
|
# ? Dec 28, 2007 18:20 |
|
Heffer posted:1) ":scaffold" 1. I would just skip scaffolding. I think it's a pretty pointless feature. 2. I think it's a good idea to start using migrations, unless you are working with a legacy database, in which case I have no idea. Routes. If you have thed default route, /:controller/:action/:id, then if you pass in a uri like /users/show/fred, then it will call the show method on the users controller setting the :id parameter to 'fred'. I recommend googling for named routes, and restful routes. That should help get you started.
|
# ? Dec 28, 2007 18:51 |
|
SpaceNinja posted:can anybody recommend a better MySQL browser under Windows?
|
# ? Dec 28, 2007 19:42 |
|
|
# ? May 14, 2024 08:30 |
|
jonnii posted:Routes. Is there an api for the map object and what functions I can call on it? I can't seem to find an explicit api for it. EDIT: Is this is? http://api.rubyonrails.org/classes/ActionController/Routing/RouteSet/Mapper.html Wheres the syntax for map.resources or map.with_options? EDIT2: Ruby has terrible API docs. Is there a book that will teach me Rails 2.0 or is that too new? EDIT3: Why is the map.resource API over in http://api.rubyonrails.org/classes/ActionController/Resources.html ? Is it a different class? Still looking for with_options. Heffer fucked around with this message at 22:48 on Dec 28, 2007 |
# ? Dec 28, 2007 22:26 |