[Rails] Re: railslist.com - an opensource craigslist!
It runs very quickly when it's working, but I did have a lot of intermittent downtime in-between browsing (1-2 minute spurts). [note: that may just be my ISP, a lot of sites seem to be going slow today]. For testing purposes, it might be better to just have a couple of cities. I was unable to find any other posts so I didn't spend too much time browsing. I do agree that it is too similar to Craigslist (which is far from a perfect design to begin with). However, it is a great job so far, congrats! There are little things that still need to be worked on: 1) if a user submits a new classified, the app should auto-fill the city and category (when possible) 3) go to the user's posting after activation On Aug 15, 1:44 pm, Rails List rails-mailing-l...@andreas-s.net wrote: Today, I have successfully launched a href=http://www.railslist.com;railslist.com/a, an open source craiglist style classifieds script. It is named as such to reflect the fact that it has been developed using rails. It will be released to open source community today. In the meantime, i would appreciate if you could take time to have a look, play around and let me know any issues. This is a beta release and we will be releasing patches based on your feedback. More features will be added as and when the community responds with their requirements. This is my very first open source release, so please feel free to suggest me with your tips. Regards www.railslist.com -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: block pop-up for rails apps
That's possible but then you would probably be in violation of your ISP's TC. Definitely go with real hosting. On May 29, 11:41 am, Shuaib85 shuaib.za...@gmail.com wrote: Someone told me about a javascript code that solves this problem. I am not sure whether this true or not On May 29, 9:24 pm, Shuaib85 shuaib.za...@gmail.com wrote: On May 29, 8:51 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: On May 29, 2009, at 1:00 PM, Shuaib85 wrote: any idea how can i stop the pop ups because my google ads campaing is rejected due to this issue Pay for real hosting? Yes, I am taking a real hosting plan. This is not a Rails question but an ISP question. On May 28, 6:00 pm, Shuaib85 shuaib.za...@gmail.com wrote: Hi all Sometimes on some ISP, my application pop ups some ads for that company. However, some other websites do not get the pop up when I open the website using the same ISP. Is there a way that I can block those pop ups, thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: cycle(...) - is there some sort of only_first_time(...)?
I would prefer to use each_with_index: @records.each_with_index do |r, i| first record: #{r.name} if i == 0 just another record: #{r.name} end On Apr 19, 5:27 pm, Ryan Waldron r...@erebor.com wrote: It might be instructive to look at the code for the cycle method. It actually creates an object and calls its to_s method each time you call 'cycle'. You could do a similar thing. Create a small class with a 'to_s' method that returns something the first time, but nothing thereafter. class Once def initialize(first_value) @value = first_value end def reset @value = '' end def to_s value = @value reset return value end end Stick that in lib/ or include it some other way. Then you can call cycle, but pass your object as a single argument to cycle (cycle doesn't require actually more than one param, though you could pass your object as both params, or just pass it as the first param and '' as the second): % label_once = Once.new('_bar') % tr class='foo%= cycle(label_once) %' You'll get tr class='foo_bar' ... tr class='foo' ... tr class='foo' Might be a bit overkill, but kind of fun. :) On Sun, Apr 19, 2009 at 5:52 PM, Joshua Muheim rails-mailing-l...@andreas-s.net wrote: Just write one: in a helper: def only_first_time(what) first_time = @previous_what.nil? �...@previous_what ||= what what if first_time end Thanks, but that's not very versatile. I could only use it once. AFAIK I can use cycle() wherever I want, so I'd like the helper to be somehow dependant from where it has been called. Is this possible? Thanks -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Injecting Ruby code into a javascript file?
I think this is what you are looking for: generate dynamic javascripts in the javascripts/ folder: http://railscasts.com/episodes/88-dynamic-select-menus You can cache the JS with standard Rails caching mechanisms. Here is how: http://railscasts.com/episodes/89-page-caching On Apr 16, 9:00 am, Tom Ha rails-mailing-l...@andreas-s.net wrote: Thanks a lot! Tom -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Anyone know what causes this?
Are you using Rack? It looks like you might be experiencing this error (or something very similar): http://www.elctech.com/snippets/-solved-500-internal-server-error-string-not-matched On Apr 11, 10:47 am, Gavin ga...@thinkersplayground.com wrote: In my app I've started to get a 500 error whenever trying to post to a create method /!\ FAILSAFE /!\ Sat Apr 11 18:42:28 +0100 2009 Status: 500 Internal Server Error string not matched According to the log it doesn't even get as far as the POST anyone know what might be causing this? I also have nested resources in my app - when creating one of them they seem to work fine! ? here's the full trace from the log: /!\ FAILSAFE /!\ Sat Apr 11 18:42:28 +0100 2009 Status: 500 Internal Server Error string not matched /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:73:in `[]=' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:73:in `normalize_params' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:89:in `normalize_params' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:58:in `parse_nested_query' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:56:in `each' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:56:in `parse_nested_query' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/request.rb:132:in `POST' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/methodoverride.rb:15:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/params_parser.rb:15:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/rewindable_input.rb:25:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/session/cookie_store.rb:93:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/reloader.rb:9:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/failsafe.rb:11:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/lock.rb:11:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/lock.rb:11:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/lock.rb:11:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/dispatcher.rb:106:in `call' /Users/Gavin/.gem/ruby/1.8/gems/rails-2.3.2/lib/rails/rack/ static.rb:31:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/urlmap.rb:46:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/urlmap.rb:40:in `each' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/urlmap.rb:40:in `call' /Users/Gavin/.gem/ruby/1.8/gems/rails-2.3.2/lib/rails/rack/ log_tailer.rb:17:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/content_length.rb:13:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/chunked.rb:15:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/handler/mongrel.rb:61:in `process' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 159:in `process_client' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 158:in `each' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 158:in `process_client' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 285:in `run' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 285:in `initialize' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 285:in `new' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 285:in `run' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 268:in `initialize' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 268:in `new' /Users/Gavin/.gem/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 268:in `run' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/handler/mongrel.rb:34:in `run' /Users/Gavin/.gem/ruby/1.8/gems/rails-2.3.2/lib/commands/server.rb: 111 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
[Rails] Re: Application without database.yml
It is possible to use Rails without a database. This is what Fernando is referring to: # Skip frameworks you're not going to use. To use Rails without a database # you must remove the Active Record framework. # config.frameworks -= [ :active_record, :active_resource, :action_mailer ] On Mar 31, 3:13 am, Fernando Perez rails-mailing-l...@andreas-s.net wrote: I agreed that there is no harm to create an empty database. Is there no other way? That's lame to install the DB software, configure it, and leave it empty. Read environment.rb and tell your app to not load ActiveRecord. -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Rails making it tougher for newbies?
Lots of good advice so far... I would also recommend checking out Railscasts.com. Ryan Bates offers great Rails instructional videos for free. Really, the best way to learn is to just immerse yourself: start building a blog or web application, watch Rails videos everyday, and learn a different Ruby construct every other day. On Mar 22, 9:53 am, Hugh Themm mchugh...@gmail.com wrote: Hi there, I know it can be frustrating, even for those of us that have been in it for a while. (freezing the environment is a real chore)/ My suggesting is to forgo the print books and go straight to peepcode.com and the pragmatic programmers(http://www.pragprog.com/ titles/rails3/agile-web-development-with-rails-third-edition) sites and watch the up-to-date screen casts and buy the pdfs. The great part about rails is it's agility, and that works both ways. My suggestion is also to really learn the ruby language and the rest will follow. On Mar 21, 5:12 pm, Power One rails-mailing-l...@andreas-s.net wrote: I'm trying to learn how to use ruby on rails. Just two weeks ago I'm learning how to program in Ruby, but now I'm ready to get onto with rails. I got a book for rails but it shows me rails examples that only work with rails 1.2.3. I follow the examples, but many are not working. For example, scaffold is not working with 2.1.0 (rails version install in my computer. My question is, how do you go about scaffold in rails 2.1.0? Some pagination is not working out of the box such as will_pagination and classic_pagination. Ubuntu 8.10 is making rails more difficult, and installing will_pagination from gems didn't do the trick. Anyone know a complete tutorial that teaches how to install all necessary gems/plugins/debian packages that will help me smooth-sailing in my ruby on rails adventure? Thank You. Also I couldn't find a good beginning ruby on rails book that is up-to-date, and I know ruby on rails is a very fast moving framework as ruby is also a very fast moving programming language -- things are changing constantly for the better. Any guide to better rails way? Thanks... -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Getting Rails to send email
Hey Peter, Nicolai is correct, this isn't really the right place for this kind of question. However, because I have recently setup a Postfix mail agent on Slicehost, I might be able to help you. Their documentation is actually really good. Additionally, if you just need outgoing mail (like sending emails to admin), then you probably won't even have to configure ActionMailer (the default settings should work). Check out the docs and if you are still having trouble, shoot me an email. http://articles.slicehost.com/2008/7/29/postfix-installation HTH, Jason Arora On Mar 21, 5:09 pm, Codeblogger codeblog...@gmail.com wrote: 2009/3/21 Peter Hickman pete...@ntlworld.com No quite what I was looking for. I have seen plenty of documentation as to how to send mail from Ruby but they all assume that you have an MTA like sendmail, postfix or exim4 already set up. The machine that I have has neither installed or, obviously, configured. Hi Peter, answering this question is out of the scope of this mailing list. You will find plenty of mail server installation guides via your favorite search enginee - or you can you existing mail accounts (see guides.rails.info). Regards Nicolai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---