|
BUGS OF SPRING posted:I asked recently about getting RoR setup on windows for some development. You're right in doing a linux VM for Ruby, windows support is poo poo. Ubuntu is very popular so there'll be a ton of resources. The big downside is the ubuntu ( or debian, I don't know ) packagers have really really hosed up the ruby for really inane reasons. So you'll either want to build your own ruby from source, or just really quickly install rvm, and then make the rvm ruby default, or choose some other distro. i don't have any recommendations, though, since I usually go with ubuntu server and just build my own ruby, when I have to.
|
# ? Feb 25, 2010 22:21 |
|
|
# ? May 14, 2024 04:28 |
|
rvm is utterly fantastic. As long as you have git installed, you can have a non-braindead ruby installation on almost any platform in minutes. I am probably missing something obvious, but it shouldn't be much harder than: code:
|
# ? Feb 25, 2010 22:36 |
|
I'll give this a try tonight. Thanks!
|
# ? Feb 25, 2010 22:54 |
|
Yes, rvm will fix the terrible Ruby on Ubuntu since you'll be completely independent of the system Ruby. rvm would probably work decently in Cygwin but I don't even want to think about Cygwin anymore. Also, don't even touch Rails 3 yet. I've been doing Rails for like 5 something years and it's very different and I keep running into stuff I don't have a clue about, so if you're just learning you're going to be completely confused and there isn't a lot of documentation out there for Rails 3 yet, and nothing at all for new people.
|
# ? Feb 25, 2010 23:06 |
|
NotShadowStar posted:Yes, rvm will fix the terrible Ruby on Ubuntu since you'll be completely independent of the system Ruby. rvm would probably work decently in Cygwin but I don't even want to think about Cygwin anymore. Bundler 0.8 was great, bundler 0.9 just keeps loving me
|
# ? Feb 26, 2010 00:11 |
|
Re: Ruby on Ubuntu: I've gotten along just fine with the stock Ruby/RI/RDoc/IRb, but do install RubyGems from source, since (AFAICT) that's the component that clashes with how the OS maintainers want to organize things. That said, RVM is pretty nice and would obviate any need to backport newer core Ruby packages on the LTS releases, and I'm planning on investigating it more. Its support for mini-environments with distinct gem installations (gemsets) is something Ruby sorely needs, but when I tried it about a month ago, the actual UI for manipulating them was extremely flaky. Here's hoping it improves or Rip version 2 gets going sometime.
|
# ? Feb 26, 2010 00:31 |
|
NotShadowStar posted:Also, don't even touch Rails 3 yet. I've been doing Rails for like 5 something years and it's very different and I keep running into stuff I don't have a clue about, so if you're just learning you're going to be completely confused and there isn't a lot of documentation out there for Rails 3 yet, and nothing at all for new people. Seconding this. The webservices guy on my team and I have been playing around with it (him mostly) for an app we started a little while ago. We figured we'd learn Rails3 early and not obsolete our app out of the gate, plus he was a big Merb guy and contributed a lot to DataMapper, so we had high hopes for the merger. It's been a giant pain in the rear end. We've been fighting the bundler, fighting nested form helpers and error handling, fighting our own specs breaking all the time, and all of a sudden with the latest beta gems it started taking twenty goddamn seconds to load rails+our app. This might not sound like much, but that means when we want to do really rapid refreshes of model code and run the specs and whatnot whenever we save a file...we can't. Running specs becomes incredibly slow and frustrating, and we have been pushing TDD as hard as we can, and now even when we want to run a single spec we have to wait. We monkey-wrapped Kernel#require to profile nested loads and see what was taking so long: rails was 16 seconds, our app was 4. We cut out crap we don't need like ActionMailer or whatever it's called now, and chopped it back a few seconds, but we're out of easy wins now. Really disappointing, actually.
|
# ? Feb 26, 2010 03:57 |
|
If you learn RubyMine which is a pretty wonderful cross platform IDE, you can have pretty much the same development environment on OS X, Windows, and Linux. I develop RoR in OS X at work and develop my hobby RoR apps in Windows 7 at home just fine. These are the additional caveats I have found with windows: -use the program Console2 so you can have a tabbed shell because the default cmd.exe is really dated. -don't use the OneClick installer, it is outdated. Use the RubyInstaller instead at http://rubyinstaller.org/ since it has the latest Ruby binaries. -until the mysql gem for windows gets updated, it seems you need to use mysql 5.0 32 bit (I believe the latest is 5.1 right now) -google code has a version of git for windows so you don't have to install cygwin or mingw LordNova fucked around with this message at 05:13 on Feb 26, 2010 |
# ? Feb 26, 2010 05:08 |
|
What's your guys' issue with Bundler presently? At first I was fighting it because I didn't understand it, but once I understood how it works it's amazing and I use it for non-Rails stuff as well. Also RSpec/Cucumber aren't working for Rails 3. I'm surprised your current specs even work. In so much that he's rewriting RSpec from scratch for RSpec 2 http://github.com/rspec/rspec-core. Cucumber uses the old style generators while Rails 3 uses Thor, thank goodness. The old generators were... hosed up to put it nicely. I'm building a new app in Rails 3 from scratch without testing (can't stand Test::Unit) but have a high priority list of stuff in my project management to add specs once RSpec 2 is feature complete.
|
# ? Feb 26, 2010 07:28 |
|
LordNova posted:Anyone else going to the LA Ruby conference this weekend? drat, I wish I saw this sooner - spent a day by myself not talking to anyone. I went for the class day on Friday, but not for the Saturday talks. Did you end up going? I took the Nokogiri/Mechanize class and the Rubygames/Gamebox class. Both were well worth the extremely cheap $60 per course fee. The guy who created Nokogiri gave a nice primer on Xpath and CSS selectors which was a great foundation to learn from.
|
# ? Feb 26, 2010 07:48 |
|
plasticbugs posted:drat, I wish I saw this sooner - spent a day by myself not talking to anyone. I was actually there for the Saturday talks and not the Friday classes. There were a few interesting lectures on the lower level threading and garbage collecting mechanisms of the ruby interpreter, unusual data structures, and ways to bring a Rails site down. It was interesting, but definitely not anything revolutionary or amazing. Half the people in attendance elected to spend the lectures browsing Twitter and Facebook on their macbooks.
|
# ? Feb 26, 2010 09:28 |
|
LordNova posted:-until the mysql gem for windows gets updated, it seems you need to use mysql 5.0 32 bit (I believe the latest is 5.1 right now) I'm using MySql 5.1.41 64 bit on my Windows 7, you just need the 32 bit version of the dll file that the gem uses. Once you have the mysql gem installed grab the libmySQL.dll from InstantRails. http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/ Then copy over the libmySQL.dll to your MySQL bin folder. (I just renamed the existing one incase I had a problem later)
|
# ? Feb 26, 2010 21:34 |
|
I have a blog in rails and it makes use of the truncate helper to add a "read more" link to posts. Any post that is over 2000 characters is given the treatment. I was wondering if anyone had any suggestions for a more flexible way to implement an "after the jump" link?
|
# ? Feb 27, 2010 00:08 |
|
smug forum rear end in a top hat posted:I have a blog in rails and it makes use of the truncate helper to add a "read more" link to posts. Any post that is over 2000 characters is given the treatment. I was wondering if anyone had any suggestions for a more flexible way to implement an "after the jump" link? This would be pretty simple using rjs templates if you want some help let me know
|
# ? Feb 27, 2010 00:24 |
|
Radiant does this by checking for an 'extended' attribute for a page. For example, you can set your above the fold content into @post.body and the rest of the content in @post.extended. When displaying posts, check the value of @post.extended, if it contains text, output the read more link.
|
# ? Feb 27, 2010 00:25 |
|
This might be a dumb question, but I'm having some issues with Rails. I'm just starting out with it, and am running everything off my Dreamhost account (since I prefer to have it available anywhere I go). I'm following this tutorial (which is one of the better programming tutorials I've seen in a long time). It advocates using rspec for testing. When I try to run it, I get errors like this:code:
code:
I've been digging around on the interwebs, and it looks like a load of people have this problem, but I've not been able to find a concrete solution. Everything else seems to work (though I haven't really gotten so far as to start using the database for anything yet), so far I've only noticed it when trying to run spec. Any ideas? It's not a big deal (yet), but it's making it a somewhat frustrating learning experience.
|
# ? Feb 27, 2010 14:52 |
|
Does /tmp/mysql.sock or /tmp/mysqld.sock exist? That's another common location. You can add socket: /path/to/whatever.sock when you find it. Edit: Oh I'm retarded and don't read. Tests run under the "test" environment, and you only have development and production specified.
|
# ? Feb 27, 2010 15:01 |
|
quote:Edit: Oh I'm retarded and don't read. Tests run under the "test" environment, and you only have development and production specified.
|
# ? Feb 27, 2010 15:16 |
|
Nevermind I figured it out, needed to install curl.
keep it down up there! fucked around with this message at 07:47 on Mar 3, 2010 |
# ? Mar 2, 2010 21:24 |
|
You probably need to install curl
|
# ? Mar 3, 2010 07:49 |
|
Okay I'm all setup and rails seems to be running on ubuntu, finally Thanks everyone for the help, it's gonna be nice to be out of windows. One final setup question, does anyone know a good editor to use? Preferably something that will show my file directory so I can swap around easier. I was using netbeans for RoR in Windows and really liked the way it worked. Syntax highlighting would be a bonus too.
|
# ? Mar 3, 2010 15:38 |
|
gedit is pretty drat good -- best when you figure out what features you want, and discover that people have already written plugins for most of them. in one of the official ubuntu repositories there's a gedit plugins package that has a file browser plugin, which i think is what you want.
|
# ? Mar 3, 2010 17:14 |
|
Awesome, thanks. I've been using gedit so far but didn't realize there were plugins.
|
# ? Mar 3, 2010 17:27 |
|
i use:
i think my syntax highlighting is "better" than the default too. google around and see if you're getting the most out of gedit
|
# ? Mar 3, 2010 18:22 |
|
I switched over to Vim and it rules if you're willing to sink time into learning it. Also this guy has a decent setup: http://akitaonrails.com/2009/01/04/rails-on-vim-in-english
|
# ? Mar 4, 2010 00:52 |
|
BUGS OF SPRING posted:One final setup question, does anyone know a good editor to use? Preferably something that will show my file directory so I can swap around easier. I was using netbeans for RoR in Windows and really liked the way it worked.
|
# ? Mar 4, 2010 03:14 |
|
Splinter posted:Why not stick with Netbeans since you like it and know it already? I wasn't even aware it's available for ubuntu, and didn't think to look. Wow, thanks a ton
|
# ? Mar 4, 2010 06:02 |
|
After a few more instances of having to deal with things breaking on the shared hosting that the Rails site I built my dad is hosted on, I've decided to bite the bullet and get some VPS hosting instead. gently caress mongrel. To make the cost increase palatable to him, I plan to host both our websites on the same VPS and split the cost. Each site is pretty low traffic and low space usage; his is an art gallery running on RoR and MySQL, mine is a Wordpress site for personal research and software that gets updated maybe a couple times a year. I don't have figures for number of hits a day off the top of my head, but neither of us even approach anywhere near our monthly bandwidth quotas. What's the bare or near-bare minimum requirements for RAM on a VPS that I can probably get by with? I'm asking here because I figure the Rails app is the primary cause for concern when it comes to resource usage. It uses RMagick for image manipulation when something is uploaded to the gallery, but I would switch to MiniMagick if I made this change. I'd also plan on running Nginx and Passenger, and I've read that using MyISAM in my database instead of InnoDB will also improve my resource usage. Any other recommendations for things I can do to pare things down? I'm looking at ramhost.us -- they have some very nicely priced plans that I can convince him are a worthwhile upgrade from his $20/year shared plan, but I want to make sure I don't get something too small for what we need.
|
# ? Mar 5, 2010 15:12 |
|
512MB is probably sufficient, especially if you give Ruby Enterprise Edition (terrible name, apparently solid kit though) a try, when paired with Passenger you're supposed to get a very decent reduction in total memory footprint. For reference I run two Redmine instances, a couple tiny Django sites, a couple instances of a Python-based wiki engine, and various other odds and ends, all on a VPS with ~512 MB -- and I'm not even using Ruby EE -- and it generally works fine. The nice thing about VPS plans is you can often upgrade when necessary without a reinstall/reformat. Any VPS host that says "no we cannot up your ram allotment easily with just one quick reboot" is not a host you should be considering anyway
|
# ? Mar 5, 2010 15:22 |
|
Flobbster posted:... stuff about hosting ... Have you considered using heroku? It's pretty awesome. For your wordpress you can get a 6 dollar a month account on bluehost.
|
# ? Mar 5, 2010 16:25 |
|
Flobbster posted:I'm looking at ramhost.us -- they have some very nicely priced plans that I can convince him are a worthwhile upgrade from his $20/year shared plan, but I want to make sure I don't get something too small for what we need. I'd recommend Linode. I've been a Slicehost customer for years and they've been great, but if I were to make the decision again I'd go with Linode. They always kill on load tests and their prices are the best I've seen among the major VPS guys.
|
# ? Mar 5, 2010 16:42 |
|
jonnii posted:Have you considered using heroku? It's pretty awesome. I did a lot of early rails development with Heroku, and while I was incredibly happy with the hosting and web-based editor, i did come across a number of really weird artifacts with record sorting that seemed to only happen on Heroku, and not on any other hosts. As such, I moved over to RailsPlayground for testing and have been pretty happy with my developer account there. Its certainly not a full site, but it runs well for my purposes.
|
# ? Mar 5, 2010 16:42 |
|
asveepay posted:I did a lot of early rails development with Heroku, and while I was incredibly happy with the hosting and web-based editor, i did come across a number of really weird artifacts with record sorting that seemed to only happen on Heroku, and not on any other hosts. Heroku has likely changed significantly since you last tried it, they don't have any of that web based editor anymore. I think you'll be pleasantly surprised...
|
# ? Mar 5, 2010 17:04 |
|
bitprophet posted:512MB is probably sufficient
|
# ? Mar 5, 2010 17:07 |
|
I started hosting on RailsPlayground in '06, abandoned it for RailsMachine in March '07 (they had an awesome deployment gem full of easy rake tasks), moved on to slicehost in Feb '08 (way cheaper, full vps), and am now moving a bunch of sites over to Heroku. So much hopping around! Heroku is just a pleasure to work with. Yes it strips out lots of choice (S3 for files, sqlite3 for db, no dedicated IP/SSL is very expensive) but it is fast, reliable, and by far the easiest hosting I've developed for. Databases under 5MB being free is pretty sweet too, since that covers a lot of small websites. If you need the full control of a VPS, I would recommend slicehost, but it is so much effort for just a few websites. I've also heard good things about Linode, but I've never used them myself. Unless you're a total nerd who loves server maintenance, I would stay away from VPS.
|
# ? Mar 5, 2010 17:28 |
|
Heroku is loving awesome now. That web editor was weird, and I have no idea why they thought people would want that. Now that they've completely transitioned in to hosing, they've really done a lot of great things. Just yesterday I deployed a toy sinatra app to them, which will be free for a long time since it's really just for me and my friends. I'm planning on using them for my startup's hosting too. Heroku is just so sexy. The only downside is that they don't support couchdb, though, but it's not that much of a problem since coloudant.com and heroku are both on ec2, so
|
# ? Mar 5, 2010 17:35 |
|
jonnii posted:Heroku has likely changed significantly since you last tried it, they don't have any of that web based editor anymore. I think you'll be pleasantly surprised... I've run on it since they switched to all hosting, and my projects still suffered from the same sorting issue, which was significant since they both placed high value on the position of returned objects. I ended up writing a lot of code for the first one (a forum) that would pull out the first post from a thread and display it separately since it often ended up (especially if it was edited) near the bottom. When a similar issue happened to another, totally unrelated project, but only on Heroku, is when i became suspicious. I still have my account there but I haven't used it lately. The web editor was pretty keen for people who were developing on Windows, assuming it didn't crash, which it did on a regular basis. Now that I run off ubuntu that is a non-issue, however it was useful at the time.
|
# ? Mar 5, 2010 22:39 |
|
I'm using this in one of my views: <%= link_to_function(image_tag("expand.png"), visual_effect(:toggle_blind, :registration_box)) %> The goal is to slide out the contents of a div on click. Is there an easy way to either: A) Have the image change to collapse.png after being clicked (toggling with the visibility state). or B) Have both an expand.png and a collapse.png icon visible and only have each icon work for one functionality. As in the expand icon will expand the div, and on second click won't do anything, and the collapse icon will collapse the div, and on second click won't do anything.
|
# ? Mar 6, 2010 09:22 |
|
BrokenDynasty posted:I'm using this in one of my views: Sorry for the snark, but it's the right answer: Write javascript.
|
# ? Mar 6, 2010 16:14 |
|
|
# ? May 14, 2024 04:28 |
|
asveepay posted:I've run on it since they switched to all hosting, and my projects still suffered from the same sorting issue, which was significant since they both placed high value on the position of returned objects. skidooer fucked around with this message at 18:08 on Mar 6, 2010 |
# ? Mar 6, 2010 18:06 |