|
NotShadowStar posted:-Rails isn't a language Sorry, I just spent a solid 8 hours poring over the rails site and Google and blogs searching for shreds of information. I feel like I'm reverse-engineering this framework just to try and learn it because there's really no documentation. The official Rails site is very 'lead by example' instead of being an actual reference like I'm used to with php.net. I'm definitely handicapped. I read Agile web development basically cover to cover last week and didn't really get anything out of it. I'm just used to PHP, which while it is a very messy, ugly language, works very well for web app development and is actually documented. I'll try the ruby approach. I thought Rails was something you could just learn, but that is clearly not the case. Can someone reassure me as to the business case for Rails? It seems like a very defunct language for something that is still being actively developed. It seems like every company that has tried to scale with it has eventually failed. The company I'm contracting with right now is gaga over it and I am getting a bad vibe about the whole language. Senior level devs are taking weeks and months to get poo poo done in Ruby that takes me days to do in PHP.
|
# ? Jul 28, 2011 23:18 |
|
|
# ? May 14, 2024 05:25 |
|
revmoo posted:Can someone reassure me as to the business case for Rails? It seems like a very defunct language for something that is still being actively developed. It seems like every company that has tried to scale with it has eventually failed. The company I'm contracting with right now is gaga over it and I am getting a bad vibe about the whole language. Senior level devs are taking weeks and months to get poo poo done in Ruby that takes me days to do in PHP. I think you're reading angry blogs from 2006 because everything you said is completely not true. Twitter runs on Rails. Groupon runs on Rails. Amazon has lots of Rails internally. People are actively identifying performance issues in Rails and attacking them head on. Rails 3 is way faster than anything ever. The Ruby language is not deliberately gimped by a single entity like Zend so you have to go and buy the 'enterprise' from Zend to un-gently caress the interpreter. "Rails doesn't scale" is completely 2006. In fact, it's come to pass that Rails/Django scales better than everything else out there, it's the databases that don't hold up well. yellowpages.com now runs on Rails, they did a talk on 2009 on how Rails scaled. like. a. boss. while Oracle kept falling on its face. If you read the Agile book and did the tutorial and you're still completely lost, I have no idea. Also your 'lack of documentation' is like... what the gently caress? Did you see guides.rubyonrails.org? I don't know what you're used to, but everything else I've touched I wish had anywhere near the documentation that Ruby libraries do. The only thing I've seen come close is Wordpress and high quality JS libraries like jQuery, Mootools and such. p.s. you're still doing Rails = language. Ignore Rails entirely right now. Start here: http://pragprog.com/book/ruby3/programming-ruby-1-9 NotShadowStar fucked around with this message at 23:45 on Jul 28, 2011 |
# ? Jul 28, 2011 23:40 |
|
Ok but what about rails-specific functions? Where is the reference for those?
|
# ? Jul 28, 2011 23:49 |
|
revmoo posted:Ok but what about rails-specific functions? Where is the reference for those? http://api.rubyonrails.org/ edit: I'm surprised you didn't come across this when googling rails-specific classes or methods smug forum asshole fucked around with this message at 00:06 on Jul 29, 2011 |
# ? Jul 29, 2011 00:04 |
|
revmoo posted:Ok but what about rails-specific functions? Where is the reference for those? STOP WITH RAILS Seriously. There is no such thing as a 'function' in the RUBY LANGUAGE. LEARN THE LANGUAGE FIRST.
|
# ? Jul 29, 2011 00:06 |
|
Fuckin method, you know what I mean.
|
# ? Jul 29, 2011 01:02 |
|
NotShadowStar posted:I think you're reading angry blogs from 2006 because everything you said is completely not true. Twitter runs on Rails. Groupon runs on Rails. Amazon has lots of Rails internally. People are actively identifying performance issues in Rails and attacking them head on. Rails 3 is way faster than anything ever. The Ruby language is not deliberately gimped by a single entity like Zend so you have to go and buy the 'enterprise' from Zend to un-gently caress the interpreter. It seems like I've read a bunch of blog articles about replacing this part and that part of Twitter with Java (or something else) in place of Rails. On a side note, our first 'Rails 3' app does something goofy and freezes our server up a couple times a day. The server also runs Rails 2 apps so we are going to throw up another virtual server or something just for that app, and future apps. 3.09, I'm not sure exactly what's going on with it but another of our developers said it's a problem plenty of others are having.
|
# ? Jul 29, 2011 03:58 |
|
revmoo posted:I'm definitely handicapped. I read Agile web development basically cover to cover last week and didn't really get anything out of it. I'm just used to PHP, which while it is a very messy, ugly language, works very well for web app development and is actually documented. Did you read it, or are you actually working through it?
|
# ? Jul 29, 2011 04:00 |
|
Bob Morales posted:It seems like I've read a bunch of blog articles about replacing this part and that part of Twitter with Java (or something else) in place of Rails. Yeah Twitter has to be the worst example. They were offline for weeks because of their choice to run Rails, and they finally replaced most things w/ Scala eventually. They're still running some Rails, I think on the front-end, but it's a pretty bad example of successful implementations.
|
# ? Jul 29, 2011 12:32 |
|
Ravelry runs completely on Ruby on Rails, and has from the very beginning! It's where I first heard about it, and what got me into Ruby in the first place.
|
# ? Jul 29, 2011 12:56 |
|
I hate the Twitter comparison. A lot of it is true, but I think there's a slight difference between "scaling" and "being one of the most popular websites in the world handling 7000 tweets per second". No poo poo a generic web framework doesn't handle that out of the box.
|
# ? Jul 29, 2011 13:15 |
|
Turns out we have Passenger 2.2.x which doesn't have smart spawning, and we need to upgrade our production server to Passenger 3.0, which our staging server has been running.
|
# ? Jul 29, 2011 13:59 |
|
Sharrow posted:I hate the Twitter comparison. A lot of it is true, but I think there's a slight difference between "scaling" and "being one of the most popular websites in the world handling 7000 tweets per second". No poo poo a generic web framework doesn't handle that out of the box. Also the Twitter engineers were amateurs. Their databases had no indexes when they launched! None! They also wrote their own message queue in Ruby, when there was a dozen great ones to choose from. They claimed Rails couldn't support Master/Slave replication of Mysql, and they were shown how to do it in about a dozen lines of code that same day. And then at every opportunity they've blamed Rails for their scaling issues. It really pisses me off.
|
# ? Jul 29, 2011 22:38 |
|
Evil Trout posted:And then at every opportunity they've blamed Rails for their scaling issues. It really pisses me off. VC investors tend to frown upon your admitting you're inept. Demonstrating it through your terrible products is fine, actually plainly stating it in words is not. Why kill the foosball-and-Cisco-phone-laying goose when you can throw your framework under the bus?
|
# ? Jul 30, 2011 01:45 |
|
revmoo posted:They're still running some Rails, I think on the front-end, but it's a pretty bad example of successful implementations.
|
# ? Jul 31, 2011 06:52 |
|
Pardot posted:A couple of things to try, more or less in order: Thanks for this. I'm hesitant to provide a max-age since the images do change and not on a predictable basis. I now set Etag and Last-Modified in PhotoController#show but unless the browser sends a HEAD request before each GET are those going to matter?
|
# ? Aug 1, 2011 22:41 |
|
Reading the poignant guide to Ruby to get my ruby down before going in. However, my brain can't seem to get all the metaprogramming stuff. Is that really necessary for Rails???
|
# ? Aug 3, 2011 19:10 |
|
The internals of Rails used to be a huge metaprogramming mess, but Rails 3 is much, much nicer. You hardly ever do metaprogramming in Ruby, only when you really need to abstract stuff out to the outer planets. The one thing you should really take away from all the metaprogramming talk is that classes are always open and can be modified and extended at any time in a variety of ways: directly by re-doing 'class Stuff', or indirectly through 'Stuff.class_eval', including Modules, and on and on and on. That's used quite a bit, but the stratosphere level define_method, send_message, and method_missing stuff you should never have to touch.
|
# ? Aug 3, 2011 21:33 |
|
Plastic Jesus posted:Thanks for this. I'm hesitant to provide a max-age since the images do change and not on a predictable basis. I now set Etag and Last-Modified in PhotoController#show but unless the browser sends a HEAD request before each GET are those going to matter? I think you can get rack-cache to still store that stuff without the max-age, but I'm not sure. If rack-cache has it, it'll check against the etag and work correctly as a cache. quote:metaprogramming I agree with everything nss said, and think it's time again for [img-metaprogramming]
|
# ? Aug 3, 2011 23:01 |
Doing a project in rails for work. I have all these .ind files in a tmp directory, do those need to be in version control? My office uses SVN Should I be using git instead?
|
|
# ? Aug 4, 2011 20:37 |
|
A MIRACLE posted:Doing a project in rails for work. I have all these .ind files in a tmp directory, do those need to be in version control? .ind files as in, InDesign? I'm not familiar with the program, but if it outputs html and css, then those are the files that should definitely be checked in. I'd ask your work if they want to save the project files that way as well. quote:My office uses SVN Should I be using git instead? I'd say yes, but then, I'm an ideologue. Read up on git-svn and choose for yourself.
|
# ? Aug 5, 2011 01:01 |
|
We just switched to git here and it loving rules rules rules. I have no one to blame but myself for clinging to familiarity of SVN for so long.
|
# ? Aug 5, 2011 05:22 |
|
All of the Pragmatic Programmer print and ebooks are 40% off this week! http://media.pragprog.com/newsletters/2011-08-08.html
|
# ? Aug 8, 2011 15:55 |
|
8ender posted:We just switched to git here and it loving rules rules rules. I have no one to blame but myself for clinging to familiarity of SVN for so long. Yeah, I absolutely love being able to branch willy-nilly and commit while offline. Especially the committing while offline; I used to use SVK with SVN for that, eventually it would always get dog slow or corrupt my local repo with all the SVK history and that turned into a nightmare fast.
|
# ? Aug 8, 2011 21:28 |
|
Pardot posted:Your conditionals there are just checking that the number 2 is greater than the number 1 or not. I have it on good authority that 2 is always greater than 1, and 1 is never greater than 2. So I finally got around to sticking this code in as I've been very busy the past few weeks with other stuff, and it worked handily! Thanks very much for your help! One last question related to this, the error it generates here looks like this: code:
Thanks again!
|
# ? Aug 8, 2011 22:55 |
|
revmoo posted:Fuckin method, you know what I mean. I feel your pain a little bit. Rails 3 might be faster than everything else, but from a cosmetic standpoint it also started using a lot of different files with a lot of different filetypes. I've begun falling out of the loop while more and more different files doing different things are scattered all over the place. Some of them I am required to edit several of to do a simple configuration change instead of just one like before. New technologies are being applied across the board in order to gain those speed enhancements, but none of them feel very vanilla. A lot have started feeling a little bit more like plugins, being bolted to the very internals that are driving Rails applications. It feels (to me) like the modulability which is generally a good thing of the base technologies now being used in Rails indicates that people creating the underlying Rails framework, don't really care about Rails specifically. Perhaps that people creating the underlying technologies, envision a near future where Rails gets replaced by something else, like it's their fantasy. Perhaps they don't like the internals of Rails very much and think it's just a good medium with which to show off their technological enhancements because Rails is currently such a popular framework. It feels (to me) like Rails is getting new stuff attached to it left and right to make it work better, but that ultimately we could start over and develop a framework designed to make use of the same technologies from scratch, better. You do need to learn ruby though, all of that aside... it's a really powerful language. Leave all this framework stuff until after. Nolgthorn fucked around with this message at 04:05 on Aug 9, 2011 |
# ? Aug 9, 2011 04:01 |
|
Nolgthorn posted:It feels (to me) like Rails is getting new stuff attached to it left and right to make it work better, but that ultimately we could start over and develop a framework designed to make use of the same technologies from scratch, better. The additions DHH addressed at Railsconf (Haml, Sass, Coffeescript) are all in the Gemfile for a new project; you're encouraged to be aware of and modify that file as you need to. You could build a "framework from scratch," and I think you'll find that Rails 3 is actually an excellent base to use for this. It's modular enough for you to swap out ActionView, ActionController, ActiveRecord, etc.
|
# ? Aug 9, 2011 05:09 |
|
Nolgthorn posted:It feels (to me) like Rails is getting new stuff attached to it left and right to make it work better, but that ultimately we could start over and develop a framework designed to make use of the same technologies from scratch, better. Look at Padrino. It's a completely modular, agnostic framework that utilizes Sinatra for the busywork of http. I wrote a recent project in it using that as the base, with Haml, Sass and Mongoid and it was pretty nice. Don't need MVC, but want the M and V? No problem, you can just map routes like Sinatra but the structure is Rails-like. I got into it because the project was going to be just one or two URLs but very heavy on the view and model parts, and I missed the generators of Rails that Sinatra doesn't have. It's a very nice middle ground.
|
# ? Aug 9, 2011 05:58 |
I think SASS is pretty neat. But do I have to leave the Sass CLI listener open and watching my .scss files for diffs, or can the interpreter just use them un-converted by virtue of having the .scss extension? Windows dev here.
|
|
# ? Aug 9, 2011 14:06 |
|
A MIRACLE posted:I think SASS is pretty neat. But do I have to leave the Sass CLI listener open and watching my .scss files for diffs, or can the interpreter just use them un-converted by virtue of having the .scss extension? Windows dev here. They have to be converted to regular CSS on-disk. You don't strictly have to leave the converter running all the time, that's just a nice-to-have when you're testing/tweaking your scss mods.
|
# ? Aug 9, 2011 16:29 |
|
A MIRACLE posted:I think SASS is pretty neat. But do I have to leave the Sass CLI listener open and watching my .scss files for diffs, or can the interpreter just use them un-converted by virtue of having the .scss extension? Windows dev here. If you are using OSX livereload it has nice little GUI widget to monitor your watched folders. And if you are not using livereload you probably should be!
|
# ? Aug 9, 2011 18:00 |
|
How do I set LiveReload to compile only my application.scss, which is nothing but SASS @import _partial.scss? And recompile it when a partial is changed. Edit: ah, you can't, yet. hmm yes fucked around with this message at 18:54 on Aug 9, 2011 |
# ? Aug 9, 2011 18:50 |
|
I don't understand the appeal of scss. Sass is great though.
|
# ? Aug 9, 2011 19:22 |
Pardot posted:I don't understand the appeal of scss. Sass is great though. I like it a little better. I'm weird and like braces and semicolons though. code:
|
|
# ? Aug 9, 2011 20:45 |
|
I'm just learning rails and ruby and I was wondering if someone can give me some tips. I'm working on my app and I've hit a validation snag that I don't know how to get around. Basically I have a date field and I have a new action that allows the input of a date but I'm not using the form helpers to make the date fields. Instead i'm using text fields. code:
I'm teaching myself rails having very little programming experience so I may be going about this all wrong.
|
# ? Aug 10, 2011 10:53 |
|
NotShadowStar posted:Look at Padrino. It's a completely modular, agnostic framework that utilizes Sinatra for the busywork of http. I wrote a recent project in it using that as the base, with Haml, Sass and Mongoid and it was pretty nice. Don't need MVC, but want the M and V? No problem, you can just map routes like Sinatra but the structure is Rails-like. I got into it because the project was going to be just one or two URLs but very heavy on the view and model parts, and I missed the generators of Rails that Sinatra doesn't have. It's a very nice middle ground. .... This has respond_to, a mailer, form helpers... it's like sinatra only I want to use it, it's like rails except trimmed down! I love it i think Haml, Sass and Mongoid is pretty much my thing these days too. thanks
|
# ? Aug 10, 2011 11:34 |
|
MuffinShark posted:I'm just learning rails and ruby and I was wondering if someone can give me some tips. It's been a while, but I think datetime_select does all of this for you.
|
# ? Aug 10, 2011 19:28 |
|
What's going on here?code:
|
# ? Aug 10, 2011 21:04 |
|
Bob Morales posted:What's going on here? It means 'loop through indexes 1 to 99 in the array @promotion.evaluations'. for the c folk this would be code:
|
# ? Aug 10, 2011 21:15 |
|
|
# ? May 14, 2024 05:25 |
|
Plastic Jesus posted:It means 'loop through indexes 1 to 99 in the array @promotion.evaluations'. for the c folk this would be Gotcha. In this particular case they'd want ALL the evaluations for the promotion so I'm not sure why they would put 0-99. Ugh.
|
# ? Aug 10, 2011 21:45 |