[Rails] Re: telnet from link_to
%= link_to(TELNET, telnet://domain.com) % Cheers, Sazima On Aug 12, 12:17 am, Me chabg...@gmail.com wrote: Is there a way to launch a telnet session from a link_to? --~--~-~--~~~---~--~~ 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: New to Rails? Read This
9 Resources for New Ruby on Rails Developers: http://charlesmaxwood.com/9-resources-for-new-ruby-on-rails-developers/ Cheers, Sazima On Jul 9, 4:59 pm, JannaB mistressja...@hotmail.com wrote: Thanks for this post. I too am coming into this new (except for a heavy Java background) and the onyl thing I would add to your list is this newsgroup. My personal goal here is to keep learning, hopefully, be able to answer other people's questions on this newsgroup. -Janna B. --~--~-~--~~~---~--~~ 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: Complete Beginner…
Might help: http://charlesmaxwood.com/9-resources-for-new-ruby-on-rails-developers/ http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/c04ab8bb12c4323d?hl=en Cheers, Sazima On Jul 14, 8:19 am, Zooshej ger...@stangl.net wrote: Hi Folks, I am a Media Designer and Ruby on Rails beginner on a very basic level. I have a good background in HTML CSS, but that’s basically it. I havent worked with Ruby before and I am just getting startet with the Terminal of my Mac OS and get the basics of JavaScript. I’ve worked my way through a lot of resources (screencasts, forums, tutorials, …) and got a pretty good overview of what Ruby on Rails can do and why it is a great framework. My problem is, the massive amount of information is overwhelming. I still look for a good point to start a project that enables me to learn Ruby on Rails on a more practical than theoretical way. What would you suggest to be a good application to start with as a beginner? A project that is quite easy to setup, and makes sense for a Designer. Thanks for your advice! --~--~-~--~~~---~--~~ 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: Ways to chart data in Rails?
Right-click the chart and you'll find Fusion Charts! http://www.fusioncharts.com/ Cheers, Sazima On Jul 12, 11:48 am, JannaB mistressja...@hotmail.com wrote: I have found a site whose charts I would like to emulate. The cahrts come up with a kind of smooth, animated look to them. If I go to:https://www.pipelinedeals.com/ and click thry the demo, a flash presentation of it comes up. I am wondering if anyone knows what off-the-shelf package they are using for this. It;s the best looking charts I;ve seen. -Janna B --~--~-~--~~~---~--~~ 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: Ui Designing with Rails opposed to PHP
Cause they don't know RoR... Cheers, Sazima On Jun 9, 3:37 am, Zayd Connor rails-mailing-l...@andreas-s.net wrote: Why are there more web design users using PHP instead of using Rails? Is there an advantage using PHP over Rails? 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: I need a lot of advice here - let's start from the beginning
Try REE and Passenger: http://phusion.nl/ Cheers, Sazima On May 29, 12:59 am, J. D. rails-mailing-l...@andreas-s.net wrote: Hi everyone - thanks for all of the input. Here's an update: I did install VirtualBox on my Vista and got the latest ubuntu and created a virtual drive etc., installing it. I'm now up and running with Vista and Ubuntu I managed to figure out how to install ruby with a sudo command. But, having a lot of other issues. I'm not all that familiar with linux so here's the list of issues I'm experiencing: I'm currently using ruby1.8.7 (2008-08-11 patchlevel 72) [i486-linux] according to ruby -v. I managed to get rubygems by typing sudo apt-get install rubygems1.8 and that installed the gems system. I did gems install rails and got a strange error saying that I don't have /home/elricstorm/.gem/ruby/1.8/bin in your path... I went out on the web and figured out how to change path by doing.. PATH=$PATH:/home/elricstorm/.gem/ruby/1.8/bin export PATH I tried installing hpricot, mysql, a few others and keep getting the following error: WARNING: Installing to ~/.gem since /var/lib/gems/1.8 and /var/lib/gems/1.8/bin aren't both writable... Building native extensions. This could take a while... Error: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb install mysql extconf.rb:1:in `require`: no such file to load --mkmf (LoadError) from extconf.rb: 1 .. I get this for a few gems, similar... Any help with my newbish run at linux would be appreciated. Also, what should I be using for an editor to program with on linux.. On windows I just used Scite.. -- 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: Auto complete onclick
Rodrigo, You can either use a hidden field for the ID or follow the approach covered by Ryan Bates in the following railscast: http://railscasts.com/episodes/102-auto-complete-association Cheers, Sazima On May 25, 9:34 pm, Rodrigo Felix rodrigofelixdealme...@gmail.com wrote: I'd like to know how I can put the id in a field when the user clicks on an autocomplete item. I have a field with autocomplete where I wanna show the name of the user but save on the database the id. My code is the following one: %= text_field_with_auto_complete :user_id, :name, {:size = 15}, {:url = users_path, :method = :get, :param_name = 'search'} % Thanks in advance -- *Rodrigo Felix* Web Developer SCJP --~--~-~--~~~---~--~~ 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: Is there any collabrative community content managemnt product available in ruby On Rails?
Guys, I did some research 2 weeks ago (interesting links: http://www.rubymatters.com/ruby-cms/ http://www.ajaxlines.com/ajax/stuff/article/top_ruby_cms.php) and found some options worth giving a try: - http://www.browsercms.org/ - http://radiantcms.org/ - http://rubricks.org/index_en.html Cheers, Sazima On May 23, 4:30 am, gundestrup gundest...@gmail.com wrote: what about insoshi?http://github.com/insoshi/insoshi/tree/master On May 23, 8:41 am, Marnen Laibow-Koser rails-mailing-l...@andreas- s.net wrote: Phlip wrote: [...] I just started with Community Engine, but it has shown no signs of sucking yet... Good to know. There's also lovdby-less and (if you want to go that route) Ning Adva-cms is a promising newcomer -- might be worth a look once it matures a bit -- Phlip Best, -- Marnen Laibow-Koserhttp://www.marnen.org mar...@marnen.org -- 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: Sending SMS messages without knowing the user's carrier
Wayne, Clickatell rocks, go for it! Cheers, Sazima On May 20, 2:46 pm, Wayne Molina wayne.mol...@gmail.com wrote: I have an idea for a new web-based application that involves the use of SMS notifications, however I can't assume a particular carrier. Most of the plugins I've seen like sms_fu require you to know the carrier in order to send a message; is there any way around this, or would I have to use an SMS gateway like CellTrust to handle this? I'm going to need to both send and receive SMS messages (in case the users want to opt-out of notiifications) The app is still in the brainstorming stage, so I'm trying to gather information on it first to determine how complex it will be. --~--~-~--~~~---~--~~ 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: How to automatically Create a new page each day?
Beware of bad SEO practices... Cheers, Sazima On May 19, 12:53 pm, Marnen Laibow-Koser rails-mailing-l...@andreas- s.net wrote: Colin Law wrote: What do you mean by 'create a new page for each day'? Colin This is the $64,000 question. If create a new page each day just means respond to URLs with a date in them or display today's content, then there is no need for a cron job and the date can just be processed like any other parameter. Best, -- Marnen Laibow-Koserhttp://www.marnen.org mar...@marnen.org -- 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: How to dump a variable?
Finally, when using mongrel, you can always print to the console: print @variable.inspect Cheers, Sazima On May 19, 4:08 am, Colin Law clan...@googlemail.com wrote: Another alternative, where appropriate, is to use the ruby debugger and break at the appropriate point to display the object using the debugger command line. Colin 2009/5/19 Benjamin Curtis benjamin.cur...@gmail.com In a view you can do this: %= debug @some_var % In a controller or model you can do this: logger.info @some_var.inspect -- Benjamin Curtis http://railskits.com/- Ready-made Rails code http://catchthebest.com/- Team-powered recruiting http://www.bencurtis.com/- Personal blog On Mon, May 18, 2009 at 9:34 PM, Phlip phlip2...@gmail.com wrote: Alex Pilon wrote: def myaction render :text myvar.inspect end im also from a php background and am used to being able to do anything i want anywhere in the app.. in rails its a bit weird to have to .. hack out variable dumping.. but anyway i hope that helps.. def myaction raise myvar.inspect end that trick is in the book. However, you should have many unit tests (functional tests) for each of your actions, so you should be able to just do this: def myaction pp myvar end then run all the tests. -- Phlip http://flea.sourceforge.net/resume.html --~--~-~--~~~---~--~~ 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: Overwhelmed with choices concerning Rails best practices
Hi Wayne, I think you're too anxious. Software development best practices are not so specific to RoR, you can follow well established patterns independent of the language/platform of choice. Regarding new technologies and Rails-specific techniques, I just tend to ignore them if they are not particularly useful/necessary to the project at any given moment. Cheers, Sazima On May 17, 8:45 am, Wayne Molina wayne.mol...@gmail.com wrote: As someone who has repeatedly tried to sit down and really pick up Ruby on Rails, the one deterrent I continually find is that the best way of doing things seem to change on a daily basis, and half the time nobody can agree with it. Since my programming background is largely self-taught and without any formal CS education, I like to make a list of the right way to develop applications in a particular language/ framework so I know that I'm going to be starting off on the right foot; this is in direct opposition to something like picking up a book on PHP, say, and cranking out junk sites and learning bad practices. In effect my problem is that whenever I sit down to really learn Rails (and I have almost a dozen books on it I've gathered over the past year, although a lot are from the prior edition - I have: AWDWR 3rd Edition, Programming Ruby 2nd edition, The Ruby Way, The Rails Way, O'Reilly's Learning Rails, Ajax on Rails, Enterprise Rails, Apress Social Networking Sites with Rails, and RailsSpace) the community seems to have charged forward and changed its best practices, so it's just added a whole bunch of things I need to learn as well. For instance, the new thing seems to be BDD and RSpec, so I have to learn RSpec in addition to Rails and Ruby. Git is used for version control, so that's something else. RJS is out and unobtrusive stuff is in, so that means jQuery. Hosting is now typically done with Phusion Passenger, so I have to learn Apache and that. Finally with the Rails+Merb merger things are going to get shaken up even more so. I really want to learn Rails but the community seems to just keep jumping from one bandwagon to another without staying put long enough for somebody who didn't come aboard in 2005-2006 to ever get to speed. Like I said I like to follow best practices because I come from .NET and I've seen what just slapping together code can do, and it's not pretty, so I feel like if I'm going to learn Rails, I need to learn it right from the start, not learn the obsolete way of writing it and then upgrade. Can somebody knock some sense into me in this regard? I've been trying to learn Rails for over a year now and this is the main reason why I can never get more than basic tutorial-style stuff going on. --~--~-~--~~~---~--~~ 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: moving a project from windows to linux
Hey Adam, Copying usually works, but is the dirty solution. I usually create the whole rails environment in the target machine and then just checkout the application as usual. Cheers, Sazima On May 4, 11:04 am, Adam Akhtar rails-mailing-l...@andreas-s.net wrote: How easy is it to do this. Is it simply a case of copying the project directory over to the linux directory or does one have to create a new project in the linux system and copy paste (due to the wonders of rails magic)??? -- 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: Ruby on Rails Certification
Or you o can take a practical approach, write software, show results! Perhaps contribute to the rails community with a plugin or something. Cheers, Sazima On Apr 30, 11:16 pm, shusseina s.anderson...@gmail.com wrote: Is there any Ruby on Rails certification available for RoR developers? I am thinking of getting into RoR development, but would like to get certified if possible so I have something to stick on my resume. 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: What is the sequential steps of installing RoR?
Sheru, Forget about Win, go for Linux over a virtual machine, for example Ubuntu running on Sun xVM VirtualBox. It's way easier, faster, better! Cheers, Sazima On Apr 26, 3:06 pm, sheru sst...@gmail.com wrote: Hi, I am Sheru am completely new for this web framework. I am really really enthusiastic to know the Ruby on Rails possibly try to use this framework near future. But at the start up, I don't have idea on installing RoR on Windows XP. 1. What is the sequential intalling components of RoR? 2. How easily could I get the RoR website hosting server? Hope that I will get response. Thank you all. Sheru --~--~-~--~~~---~--~~ 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: still cannot install rails on windows
SpringFlowers, I used InstantRails and it worked quite smoothly, but was very slow. I'm switching to Ubuntu over Sun xVM VirtualBox. You should definitely give it a try! Cheers, Sazima On Apr 21, 8:39 pm, SpringFlowers AutumnMoon rails-mailing- l...@andreas-s.net wrote: Marnen Laibow-Koser wrote: SpringFlowers AutumnMoon wrote: [...] when generating the app, i just use rails fourth so is it default to sqlite if i am using the most recent rails? thanks. Probably -- but don't waste time guessing. Rather, look at the database.yml file. That will let you know exactly what the app expects! Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org hm, thanks. everything inside that file says sqlite... so i wonder why the javascript pop up says libmysql.dll -- 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: ROR performance for milions pageviews/month
Tom, Check Joyent's article on LinkedIn scaling (Scale Rails to 1 Billion Pageviews): http://www.joyent.com/a/scale-rails-to-1-billion-pageviews Also, we're currently revamping a couple very large sites using rails, so we're quite confident on its performance. (vc tá em SP?) Cheers, Sazima On Apr 14, 2:26 pm, Tom Lobato tomlob...@gmail.com wrote: Hi all! I`ll rewrite a 10 years old site, written in asp/mysql (www.motonline.com.br). Now it has one milion page views a month, and we can hope it grows after rewrite. Well, I know several ror sites, but have no idea about its access stats. I already use ror for smaller projects and only need to confirm if ror can satisfy the performance demands for this. Can you comment about the ror performance for such a page view scale and/or point to some cases or statistics from existing sites? Thank you, Tom Lobato --~--~-~--~~~---~--~~ 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: Packaging Rails App as Standalone EXE
Jean, Have you seen Joyent's Slingshot? http://www.joyent.com/developers/slingshot/ Cheers, Sazima On Mar 31, 3:06 pm, Jean-Etienne Durand rails-mailing-l...@andreas- s.net wrote: Hi, Does anyone know what is currently the proper way to distribute a Rails app as a windows exe (NT Service, how to package, ...). I know there washttp://www.erikveen.dds.nl/distributingrubyapplications/rails.html, but it's pretty old. 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: managing multiple rails applications with apache
Phusion Passenger is the easiest (and increasingly better) way: http://blog.phusion.nl/2009/03/01/phusion-passenger-211-beta-released-thanks-sponsors/ Cheers, Sazima On Mar 2, 4:26 am, --- z...@m --- krishnaprasadva...@gmail.com wrote: how can manage multiple rails applications with apache i have followed the following tutorial and successfullt set up my rails site using apache http://www.howtoforge.com/ruby_on_rails_debian_etchhttp://www.howtoforge.com/ruby_on_rails_debian_etch_p2 but how can i configure apache to host more than one rails site ? --~--~-~--~~~---~--~~ 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: Storing just the year in the DB
Scott, Why don't you use the default created/updated_at fields and just format the output to present only the year? Cheers, Sazima On Feb 20, 8:02 pm, Scott Holland rails-mailing-l...@andreas-s.net wrote: Hey, This may be a simple question, but I just wanted to make sure I was doing it right. I need to store just the year in my database - i.e. vacation entitlement year = 2008 Should I store it using 'date' and leave the month and day as '0' 2008-00-00 or should i store it as an integer? Many 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: How to change Image of Markers in google map mashup???????????
Vrishali, There are instructions for that in GMaps: - http://code.google.com/apis/maps/documentation/overlays.html#Custom_Icons - http://code.google.com/apis/maps/documentation/reference.html#GMarker Cheers, Sazima On Feb 21, 7:30 am, Vrishali vrish...@gmail.com wrote: Ok Thannks.I have joined that group also...N i got help from that... Thanks for support. On Feb 20, 1:25 pm, Chris Kottom chris.kot...@gmail.com wrote: This is a question about the GMaps API, nothing to do with Rails. http://code.google.com/apis/maps/documentation/overlays.html#Custom_I... On Fri, Feb 20, 2009 at 5:19 AM, Vrishali vrish...@gmail.com wrote: Hi!! I am working on google map mashup. I tried to display the markers for four locations and its getting displayed. But these markers's image is default image by google. (balloon shaped image) Now i want to put my own image as marker, So can anybody plz tell me how it can be done? The code i follow for creating marker is, function createMarker(point,html) { var marker = new GMarker(point); GEvent.addListener(marker, click, function() { marker.openInfoWindowHtml(html); }); return marker; } Please Help Me --~--~-~--~~~---~--~~ 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: How to change Image of Markers in google map mashup???????????
http://code.google.com/apis/maps/documentation/reference.html#GIcon Cheers, Sazima On Feb 21, 3:33 pm, Sazima rsaz...@gmail.com wrote: Vrishali, There are instructions for that in GMaps: -http://code.google.com/apis/maps/documentation/overlays.html#Custom_I... -http://code.google.com/apis/maps/documentation/reference.html#GMarker Cheers, Sazima On Feb 21, 7:30 am, Vrishali vrish...@gmail.com wrote: Ok Thannks.I have joined that group also...N i got help from that... Thanks for support. On Feb 20, 1:25 pm, Chris Kottom chris.kot...@gmail.com wrote: This is a question about the GMaps API, nothing to do with Rails. http://code.google.com/apis/maps/documentation/overlays.html#Custom_I... On Fri, Feb 20, 2009 at 5:19 AM, Vrishali vrish...@gmail.com wrote: Hi!! I am working on google map mashup. I tried to display the markers for four locations and its getting displayed. But these markers's image is default image by google. (balloon shaped image) Now i want to put my own image as marker, So can anybody plz tell me how it can be done? The code i follow for creating marker is, function createMarker(point,html) { var marker = new GMarker(point); GEvent.addListener(marker, click, function() { marker.openInfoWindowHtml(html); }); return marker; } Please Help Me --~--~-~--~~~---~--~~ 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: Sending messages between users
Chris, Why don't you use (or check how it's done) restful easy messages? Alternatively, LOVD (lovdbyless.com) does it all. Cheers, Sazima On Feb 19, 10:35 pm, Christoph Jasinski christoph.jasin...@googlemail.com wrote: Hi, I'm trying to create an web app where users can write messages to each other. I use the restful_authentication plugin for the users. So they have an user_id. How ever the messages should have a: - sender - receiver - content As i saw in some screencast the association use the user_id to connect users to something. But in my model there would be 2 user_id column which obviously doesn't work. So how do I do it? My workaround was to create a receiver and sender model which contained a user_id and a message_id. Then the message contained a sender_id, receiver_id and the content. However now I'm stuck somehow. *Maybe it's because 2:30am here and I should be in bed*. I don't know. Is there an easier workaround? Some tutorials, maybe? How do I collect my mails? Have a controller named messages where I tried this, but it doesn't work (I thing my association declaration are the cause): @inbox = current_user.message.find_by_receiver_id(:user) *The Models:* class *Message* ActiveRecord::Base belongs_to :sender has_one :receiver validates_presence_of :sender validates_presence_of :receiver validates_length_of :content, :maximum = 4096 end class *Receiver* ActiveRecord::Base belongs_to :message end class *Sender* ActiveRecord::Base has_many :message end class *User* ActiveRecord::Base (restful_authentication plugin) # Virtual attribute for the unencrypted password attr_accessor :password ... attr_accessible :login, :email, :password, :password_confirmation ... end Greetings and thanks for any kind of help Chris --~--~-~--~~~---~--~~ 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: Blackbook
Hey, I used Contacts (GMail, Hotmail, Yahoo, Facebook, etc) and it worked like a charm: . gem install json-1.1.1-mswin32.gem . gem install contacts Cheers, Sazima On Feb 20, 4:36 am, Kivanc Gumrukcu rails-mailing-l...@andreas-s.net wrote: Hi, When I run the following piece of code; @gmail_xml = Blackbook.get :username = 'usern...@gmail.com', :password = 'pwd', :as = :xml Hotmail and yahoo work fine. But with gmail I get the following error: Nokogiri::CSS::SyntaxError in ItemsController#index unexpected '.' after '.' RAILS_ROOT: C:/Documents and Settings/KivancG.DDM/Desktop/jan22nd/Work/sources/wl Application Trace | Framework Trace | Full Trace C:/Ruby/lib/ruby/gems/1.8/gems/nokogiri-1.1.1-x86-mswin32-60/lib/nokogiri/css/parser.rb:60:in `on_error' racc/parser.rb:99:in `_racc_do_parse_c' racc/parser.rb:99:in `__send__' racc/parser.rb:99:in `do_parse' app/controllers/items_controller.rb:9:in `index' Any help would really be appreciated. I couldnot see anyone who got the same error. -- 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: Removing string's accents
Bob, Rails doesn't have a specific method to remove diacritics. There are a couple alternatives - I used the 1st one and it works really great: + http://snippets.dzone.com/posts/show/5609 + http://github.com/thbar/diacritics_fu/tree/master + http://www.jroller.com/obie/tags/ruby + http://www.techniconseils.ca/en/scripts-remove-accents-ruby.php Cheers, Sazima On Feb 20, 7:24 am, Chris Gers32 rails-mailing-l...@andreas-s.net wrote: Here's another solution: http://www.techniconseils.ca/en/scripts-remove-accents-ruby.php Unfortunately, I still have the same encoding problems, but hopefully it'll work for you. And don't hesitate to get back to me if you think you know what I'm doing wrong :) Good luck, Chris. -- 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: como consultar en oracle
A mi me gusta muchisimo el español, pero la mayoría de los otros miembros no van a entiender... Saludos, Sazima On Feb 18, 1:12 am, pepe p...@betterrpg.com wrote: Hola A la gente aquí no parece que le guste mucho cuando los mensajes no son en inglés. Aparte de eso la descripción de tu problema no es nada clara. ¿Has creado una vista (view?) y cuando la usas no ves datos? ¿Dónde la usas? ¿Es en la aplicación RoR en lugar de una tabla o en MySQL/Postgre/Sqlite/otra BD? Si has creado el model basado en una vista, no creo que to código vaya a funcionar. Los models están basados en las tablas mismas. Si el problema es que tu vista no muestra datos en el entorno de la base de datos el problema está obviamente en el código que utilizaste para crear la vista, a no ser que la tabla no tenga datos o no tenga datos que cumplan las condiciones requeridas para ser mostrado por la vista. Sé que esto probablemente no te ayuda nada o casi nada pero con la descripción del problema que diste es lo mejor que puedo ofrecer. Pepe On Feb 16, 4:51 pm, Oraldo Segundo rails-mailing-l...@andreas-s.net wrote: holaa todos ante todo un cordial saludo alguien que me pueda ayudar. se plantea lo siguiente necesito mostrar 2 campos de una tabla los cuales son mtin_mtin,mtin_descri de una tabla llamada re_tmtinv de esos dos campos se necesita obtener el codigo y la descripcion,y luego ser mostrado para despues ser agregados a un formulario. el problema que tengo es que ya tengo la vista pero esta en blanco alguien de ustedes que tenga una idea que me pueda ayudar en esto please quiero aprender. gracias -- 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: post to external form
Frank, What do you mean? You can't post TO a form, you post FROM a form... Cheers, Sazima On Feb 17, 9:18 pm, Frank Kim railso...@gmail.com wrote: Hi, This is probably a dumb question but I can't figure it out. How do you post to an external form? I think the easiest way would be to do a GET on the URL with the query arguments but I don't know how to do that in a Ruby on Rails controller. And it'd be cool to figure out if the form submitted correctly. Thanks, -- Frank Kimhttp://betweengo.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: como consultar en oracle
Você percebeu que esta é uma lista em inglês? Abs On Feb 16, 6:51 pm, Oraldo Segundo rails-mailing-l...@andreas-s.net wrote: holaa todos ante todo un cordial saludo alguien que me pueda ayudar. se plantea lo siguiente necesito mostrar 2 campos de una tabla los cuales son mtin_mtin,mtin_descri de una tabla llamada re_tmtinv de esos dos campos se necesita obtener el codigo y la descripcion,y luego ser mostrado para despues ser agregados a un formulario. el problema que tengo es que ya tengo la vista pero esta en blanco alguien de ustedes que tenga una idea que me pueda ayudar en esto please quiero aprender. gracias -- 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: Reset password facility
Lovd does just that, take a look at: lovdbyless.com http://github.com/stevenbristol/lovd-by-less/tree/master Cheers, Sazima On Feb 11, 7:35 pm, Shockmeister b00020...@student.itb.ie wrote: I have used a sha256 hashing algorithm in order to provide some security to my login facility. I now want to create a facility whereby, if the user forgets their password, they are emailed a temporary password so that they can login. Has anyone had any experience implementing this? --~--~-~--~~~---~--~~ 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: Should I sleep here?
Hi, Check out this excelent railscast: http://railscasts.com/episodes/129-custom-daemon It is really easy effective. Also, Thorny Gorms has some built-in checks for form expiration: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/9ec5a5112548c95e Cheers, Sazima On Feb 12, 4:35 pm, Gavin ga...@thinkersplayground.com wrote: Am I right in saying Daemons for frequent tasks (performing a specific check every minute or so) and cron jobs for less regular tasks (cleaning up sessions every week or so)? Are Daemons resource-intensive? On 12 Feb, 18:27, Chris Kottom chris.kot...@gmail.com wrote: +1 for implementing this as a cron job. Sometimes the cleanest solution is outside the framework. On Thu, Feb 12, 2009 at 4:20 PM, Gavin ga...@thinkersplayground.com wrote: Writing more unit tests for this as we speak Thanks for the tip Robert PS - I presume, if I were to use constants that I would define the constants in the class itself? On 12 Feb, 15:17, Robert Walker rails-mailing-l...@andreas-s.nethttps://mail.google.com/mail?view=cmtf=0to=rails-mailing-l...@andreas-s.net wrote: Gavin wrote: So, would it be more appropriate to write a method like def purchased? if self.status 3 return true else return false end end and then call the purchased? method to perform the check? On 12 Feb, 14:39, Robert Walker rails-mailing-l...@andreas-s.nethttps://mail.google.com/mail?view=cmtf=0to=rails-mailing-l...@andreas-s.net Actually it could be as simple as adding some constants to represent your states. Example: STARTED = 1 PROCESSING = 2 COMPLETED = 3 BILLED = 4 PAID = 5 if self.state COMPLETED You just want to avoid the use of a magic number by giving it clear meaning. -- 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: Pretty Record Lists
Hey Chad, Check the WiceGrid Plugin. Never used, but seems to be what you want: https://redmine.wice.eu/wiki/wice-grid Cheers, Sazima On Feb 9, 8:12 pm, Chad carim...@gmail.com wrote: Can anyone recommend a lightweight plugin that renders lists of records nicely with ajax sort, pagination, edit/delete links, etc? I tried ActiveScaffold, which is really great, but it's too much for what I'm trying to accomplish. Ideally it would be used sorta like this (similar to AS): controller: @users = company.users view: %= render :pretty_lists = @users % -- Thanks for any help, Chad --~--~-~--~~~---~--~~ 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: Testing on Linux VM on winXP 3 times faster than XP
So in the end you gave up on the virtual machine and are running Linux directly, is that it? Cheers, Sazima On Feb 9, 1:37 pm, Phlip phlip2...@gmail.com wrote: Can you please elaborate on the setup you mentioned? I am ashamed to. You should try Vista. I experimented with Qemu and Puppy-Linux recently, and everything was faster. I like some of Vista's toys. Things like a functional Hibernate mode. So I tried qemu-puppy on a USB drive. It worked great, but SeaMonkey, the only functioning browser, instantly died with a silly .so file error as soon as I ever tried to do anything. So, instead of dedicating the rest of my career to learning how to mix and match puppy sfs files (with the usual impossible online forum support), I just switched to a dual-boot with Kubuntu. It will do fine with half a hard-drive. When puppy, in qemu, possibly with kqemu, was doing things like building Ruby in less than a minute, instead of 15 minutes or so. Of course the Kubuntu is faster. Any volunteers to go work for MS? To help them clean up their codebase? I didn't think so... (-: -- Phlip --~--~-~--~~~---~--~~ 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: problem with instant rails
Yeah, use the rake tasks Cheers, Sazima On Feb 8, 10:30 pm, stretch stre...@gmail.com wrote: Another approach. To create the app with mysql in database.yml rails something -d mysql Get to the root directory of the app and create the dev db in specified in database.yml (assuming username and password will work for the database) cd something rake db:create Then add a posts table ./script/generate model post rake db:migrate On Feb 8, 7:02 am, Colin Law clan...@googlemail.com wrote: Create the table in phpmyadmin as you suggest, name the database something_development. It is then linked to the rails application by config\database.yml. You will need something in there like: development: adapter: mysql database: something_development username: username password: password host: localhost where username and password are those configured for mysql in phpmyadmin (in the Priviliges link from the phpmyadmin first page). Unless you have changed it then username root and no password will probably work. 2009/2/8 stretch stre...@gmail.com ending with _development is the convention for the NAME of the dev db not the tables On Feb 8, 1:14 am, priyankeshu priyankeshu.pari...@gmail.com wrote: hi thre i have just started learning ROR (following video tutorial by VTC) but on the video they were teaching on MAC, i thought i can follow along on window with instantrails... it was going fine i got the instantrails set up and yes i can test apps like mycookbook 127.0.0.1:3000 and like so.. so far so good... but after that when in the video tutorial the guy started creating a new database for a new project it created in some Mac program so i was not able to follow exactly on windows however, i did went in to Phpmyadmin to create the database for it, now i do not know .. how to link that database to my app... (in the .yml file that is) also the database i had created has table names that do not end with _development (that's i think the convention) however, in the video tutorial.. after the guy created the database, all the schema information automatically got into .yml file of the database. i have no idea how to link my app with phpmyadmin... any ideas what i am doing wrong? --~--~-~--~~~---~--~~ 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: Testing on Linux VM on winXP 3 times faster than XP
Phlip, Can you please elaborate on the setup you mentioned? You should try Vista. I experimented with Qemu and Puppy-Linux recently, and everything was faster. Cheers, Sazima On Feb 8, 10:26 pm, Phlip phlip2...@gmail.com wrote: itsastickup wrote: I had heard that ruby on a linux VM running on windows can be faster than on that same install of windows. You should try Vista. I experimented with Qemu and Puppy-Linux recently, and everything was faster. Microsoft has nobody to blame but themselves for their market erosion and incredibly bad software. (I'm posting this from Kubuntu now, thank you.) The actual tests themselves run between 2 and 3 times faster, but it seems to be initialization that takes the bulk of the time. Right - the program loader is pathetic. It assumes we want to load MS Office, once, and live inside it for a while. It can't comprehend scripts that call many small executables. -- Phlip --~--~-~--~~~---~--~~ 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: photos display on the same page
Shuaib, There are a lot of options, try thickbox, as in Lovd: http://try.lovdbyless.com/profiles/2483-qwe/photos Cheers, Sazima On Feb 8, 5:10 am, Shuaib85 shuaib.za...@gmail.com wrote: Hi there I saw a nice way of displaying photos using rails, it is like the one in the following link http://www.opensourcerails.com/projects/16425-pictrails anyone knows the name of the plugin or the way to do it --~--~-~--~~~---~--~~ 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: Insight on creating an online file editor (create, edit files, browse tree structure)
Well, you could try to 1st implement a remote shell, that is, you submit a command (like ls -la), your controller executes it and then you display the result in the browser. Maybe Capistrano gives you a start on that. After that you can work on the user interface (file tree, etc). You then start working with file editing: you need to read the file (maybe lock it), display to the user in a text area (possibly with a WYSIWYG editor like www.fckeditor.net) and then submit the contents to the server and save the file (check if it still exists) and so on... After everything is working, you might find it appealing glue it all together with AJAX. Finally, you need to control permissions, security, etc. Good luck! Cheers, Sazima On Feb 9, 3:17 am, elioncho elion...@gmail.com wrote: Hello guys, Can anyone give any ideas on how to start working to do an online file editor. I want the user to create his/her own directory on the server an be able to create new text files and edit them online. A file tree should be available to check the current files in his/her directory. Can anyone give me any insight, ideas on how to begin working on this? Thanks a lot, Elías --~--~-~--~~~---~--~~ 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: What is the url for my public folder
Shandy, Phlip is too concise, but right. The URL of your public folder is www.mysite.com/ So www.mysite.com/images/1.gif is the URL for the file 1.gif in the images directory of your public folder. Got it? Nonetheless, your public folder is just for your static assets. Rails actions are handled dinamically by the appropriate controller in the app/controllers folder. Cheers, Sazima On Feb 5, 5:38 pm, Shandy Nantz rails-mailing-l...@andreas-s.net wrote: I can't seem to find what I'm looking for but I was wondering if I have a site:www.mysite.com, what is the url for the public folder? -- 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: Validation - Credit Card Validation
Cyrus, You gotta check out Amy Hoy's cheatsheet! http://www.slash7.com/articles/2008/12/29/jump-start-credit-card-processing http://jumpstartcc.com/ Cheers, SAzima On Feb 3, 6:47 am, Cyrus Dev rails-mailing-l...@andreas-s.net wrote: Hello Everyone any one know how to validate credit card information in rails ? please help me thanks in advance -- 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: How long do you take for each Development Cycle
That's the problem with bugs, you never know how long they will take to correct. On the other hand, 4 days to resolve 25 simple bugs does not seem so tight. Cheers, Sazima On Jan 28, 3:42 pm, Ar Chron rails-mailing-l...@andreas-s.net wrote: 2 Developers * 3-4 Days * 40-50 Bugs Happiness... Feel free to alter the first, second and/or third terms until the equation balances. It sounds like you have the correct processes in place, you just need some scope management. With the idea that less is more, fewer bugs attempted should yield less rework, and less missed dates (and maybe get you home in time for dinner). Prioritize the bugs that are on the list, and don't be afraid to start tossing low priority bugs off the list if the scope of a higher priority change is larger than anticipated. Overtime may work for short bursts, but fact is fact... tired programmers make mistakes. -- 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: deployment problem
Have you tried using JRuby? Cheers, Sazima On Jan 21, 6:26 pm, mahmoud_cs mahmoudahmedfo...@yahoo.com wrote: can I deploy ruby site with glassfish? if yes how? --~--~-~--~~~---~--~~ 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 plugin for directions from Google Maps?
Use GeoKit to perform the geocoding. Cheers, SAzima On Jan 21, 7:42 pm, admanb adm...@gmail.com wrote: Does such a thing exist? YM4R only seems to do markers. --~--~-~--~~~---~--~~ 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: Installing plugins... is git necessary?
gem sources -a http://gems.github.com Cheers, Sazima On Jan 21, 9:55 pm, Sonny Chee rails-mailing-l...@andreas-s.net wrote: Hey Guys, I tried the following on my rails 2.1.1 project: script/plugin install acts_as_tree and I got the following error: Plugin not found: [acts_as_tree] This method of installing plugins worked months ago on another rails 2.0+ project Do I need to use github now? Sonny. -- 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: BlackBook Gem
Well, you could develop a shell script / rake task or something like this, but I think its cleaner to do it via web service. Cheers, Sazima On Jan 20, 6:30 am, Gaurav Sharma rails-mailing-l...@andreas-s.net wrote: Sazima wrote: Gaurav, You can have rails and PHP co-existing in the same server, but you would have to glue the applications together... You cannout use the gem directly in your PHP application. Cheers, Sazima On Jan 9, 8:46 am, Gaurav Sharma rails-mailing-l...@andreas-s.net Hi Sazima, Thanks for your response , can i invoke the ruby file/application that is using gem and returning the output to the PHP variable or i need to develop an web service in ruby and to invoke that web service from PHP. Waiting for your response. Thanks Gaurav -- 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: Attachment_fu: save to a default format
Resizing is a basic feature, take a look at the README. Format transformation, on the other hand, is more difficult and is not a known feature of attachemnt_fu... Cheers, Sazima On Jan 19, 5:51 am, comopasta Gr rails-mailing-l...@andreas-s.net wrote: Hi, would anyone have any advices on the next? I allow users to upload images to my app. I'm using attachment_fu and MiniMagick. There's two things that I'd like to do: 1- No matter what format the original file is I'd like to save it in jgp format. 2- I want to keep all images limited to say 1000px width, so resize if they are bigger. Is there a way to do that without much hassle? 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: how do I add a new font for my RoR website (hosted on linux, developed on Mac) ????
Finally, when you absolutely need something exactly as you want, use images... Cheers, Sazima On Jan 17, 11:41 pm, Marnen Laibow-Koser mar...@marnen.org wrote: On Jan 17, 5:36 pm, Fernando Perez rails-mailing-l...@andreas-s.net wrote: Greg Hauptmann wrote: oh, that makes sense - so for our Web Apps we're pretty much stuck to common denominator fonts for the browsers then? Exactly. I feel compelled to point out that this is only part of the story. First of all, it is always possible to specify a weird font as first choice, as long as you're willing to put up with fallback to another font. Second -- and more important -- is the fact that more and more browsers support dynamic font embedding as specified in the CSS2 standard; please seehttp://www.alistapart.com/articles/cssattenandhttp://en.wikipedia.org/Dynamic_fonts. It's not universal yet, but with any luck, it will become more so. Good luck! Best, -- Marnen Laibow-Koser mar...@marnen.orghttp://www.marnen.org --~--~-~--~~~---~--~~ 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: convert images with attachment_fu
Luca, It's probably possible to do it with one of the various image libraries available, but never seen that as a feature of attachment_fu... Cheers, Sazima On Jan 17, 8:17 am, Luca Roma rails-mailing-l...@andreas-s.net wrote: Hi, i'm using attachment fu plugin and mini magick for upload images. class Photo ActiveRecord::Base has_attachment :content_type = :image, :storage = :file_system, :max_size = 4.megabytes, :resize_to = '700x650', :path_prefix = 'public/images/cores', :thumbnails = { :thumb_big = '62x62!', :thumb = '30x30!' }, :processor = :MiniMagick I noted that when a user upload a jpg, the thumnails are very expensive (32k for :thumb). so i want convert all thumbnails to gif or png format. is 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: Gem::RubyGemsVersion and gem -v don't match
I had something similar, check your installations and paths... Cheers, Sazima On Jan 13, 9:18 pm, Rred Cat rails-mailing-l...@andreas-s.net wrote: Hello, 1) gem -v shows next: 1.3.1 2) my rubyrails project has boot.rb file it contains next method def rubygems_version Gem::RubyGemsVersion rescue nil end this method is called in next code: def load_rubygems require 'rubygems' min_version = '1.3.1' unless rubygems_version = min_version $stderr.puts %Q(Rails requires RubyGems = #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) exit 1 end Sometime when I open my project I have a window with next text Rails requires RubyGems = 1.3.1 (you have 1.2.0). Please `gem update --system` and try again. Why Gem::RubyGemsVersion rescue nil gets 1.2.0 when I have 1.3.1 version?? Any idea? PS: This trouble doesn't have any affect to work of project, but I interest how(where) can I fix it? PSS: start gem update --system says Nothing to update PSSS: I'm novice in Ruby so please, expand your answer (: -- 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: Sqlite3 no longer found after upgrading to Rails 2.2 on MacOS
Regarding the religious war you are referring to, I don't know why you say that. As a Merb team member I can assure you that there is not such a thing. We do not agree on the way Rails does few things, but there is no war. And it is certainly not something personal. As mentioned before, we have a lot of respect for DHH and the rest of the Rails team. Without them, I wouldn't do what I do now and Merb would not even exist. So, please don't mention some crazy sabotage theories and maybe people will stop thinking that there is a war going on. After all, aren't they going to merge in Rails 3? :-) http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3 Cheers, Sazima --~--~-~--~~~---~--~~ 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: What's this called (nuby on rails question)
Sam, I performed an analysis on background processing alternatives (see below). I greatly recommend rolling out your own daemon for recurring jobs, or using starling+workling for offloading jobs from your rails app. Both alternatives are covered in excellent railscasts by Ryan Bates. Cheers, Sazima BACKGROUND PROCESSES - http://wiki.rubyonrails.org/rails/pages/HowToRunBackgroundJobsInRails == Asynchronous Tasks Launched from Rails request/reponse cycle + optional Message Queueing - Options . ar_mailer (only for emails) = GOOD (only email) . starling + workling = EXCELLENT . Ap4r . Spawn / background= SIMPLE . ActiveMessaging . BackgroundFu . WorkerQueue . Rake in Background= SIMPLE (http://railscasts.com/episodes/127-rake-in-background) == Recurring Jobs (cron-style) Scheduled or permanently running in the background - Options . daemon_generator (rails_cron) = SIMPLE http://railscasts.com/episodes/129-custom-daemon . BackgrounDRb . rufus-scheduler = GOOD . Taskr . UNIX Cron and Runner (simple, but consumes resources and you can't controll well) On Jan 13, 4:21 am, Sam Wilson storypi...@gmail.com wrote: When your server does 1 Ruby operation a day without anyone having to visit the site to make it happen. Let's say the operation would be to create an automatic blog post on your blog site every 24 hours. This is an example what I am curious about if any RoR code can be run without users visiting. Also is this an advanced or beginner's topic? Thanks! Sam --~--~-~--~~~---~--~~ 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: how to keep track of popular items
Popular in terms of viewing or selling? Why don't you keep a counter in the DB? Cheers, Sazima On Jan 11, 10:00 pm, Mohammad Abed rails-mailing-l...@andreas-s.net wrote: I have a site which is basically a catalog of product about 30,000.00 products. What do you think is the best (in terms of performance) way to keep track of the most popular products,a part from the idea of writing web-server log parser. I'm thinking of creating a model called 'product_view' which has product_id view_counter, and updating this table in product#show. -- 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: params[:xxx]
MaD is right, no matter what the expression, you will always get an exception if you try to evaluate nil.[] You can divide the expression in two: city = (params[:user]) ? params[:user][:city] || xxx : xxx Cheers, Sazima On Jan 11, 10:07 am, MaD mayer.domi...@gmail.com wrote: @word = params[:search][:word] || params[:word] || home you can still do that. there is only a problem if params[:search] is nil. because then you'd try to evaluate nil.[] which again leads to an error. this is what Phlip wanted to tell you way up in this thread. --~--~-~--~~~---~--~~ 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: Installing Ruby on Rails
I agree RoR is hot, but if you are a good developer, you can get a job in 1 month even without learning RoR... Cheers, Sazima On Jan 8, 10:19 pm, crazy canuck b.trepani...@gmail.com wrote: I am completely new to all of this. I was told by a potential employer if I learned Ruby on Rails and PostgreSQL I would have a job in 6-9 months. My dilemma is that I cant even seem to install it properly lol. Please can someone give me the prompts and whether I have to be SU or use sudo. thank you so very much. --~--~-~--~~~---~--~~ 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: gem update problem
Exactly, check your paths, or link the standard ruby, gem and rails commands to the desired version... Cheers, Sazima On Jan 9, 11:08 am, Konstantin rasf...@gmail.com wrote: Ah, I guess the problem is in the paths! I have changed the standard gem command to work by default with Passenger. So, I guess, I should update the Passenger now? Here is an output of your commands: $ gem list -l ... rubygems-update (1.3.1) ... $ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.2.0 - RUBY VERSION: 1.8.6 (2008-08-08 patchlevel 286) [i686-linux] - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.6-20080810/lib/ ruby/gems/1.8 - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.6-20080810/bin/ruby - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.6-20080810/bin - RUBYGEMS PLATFORMS: - ruby - x86-linux - GEM PATHS: - /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - :sources = [http://gems.rubyforge.org/;, http:// gems.github.com] - REMOTE SOURCES: -http://gems.rubyforge.org/ -http://gems.github.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 Recommend a File Uploader
attachment_fu, file_column, paperclip (nice railscast) Ifo you need multiple concurrent uploads, go for something in flash... Cheers, Sazima On Jan 7, 12:13 pm, Dave Smith rails-mailing-l...@andreas-s.net wrote: Can anyone recommend a good file upload plugin for uploading standard files (more than one file per article / project), but I am not interested in images or image processing, just a standard uploader for files! -- 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: 1 Page website :)
If you don't want to use Active Record (database), just configure environment.rb to exclude it. Generate (scaffold) 1 controller and fill in the actions / views as you like. Cheers, SAzima On Jan 9, 1:04 am, typemismatch craigw9...@gmail.com wrote: Is there a way to create what is basically a 1 page website, something that just does a redirect or a single submit form etc. It seems like an entire Rails site with controllers etc is too much. Maybe something with a single .rb page .. who knows :) just learning Rails. thanks -c --~--~-~--~~~---~--~~ 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: BlackBook Gem
Gaurav, You can have rails and PHP co-existing in the same server, but you would have to glue the applications together... You cannout use the gem directly in your PHP application. Cheers, Sazima On Jan 9, 8:46 am, Gaurav Sharma rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote: On 9 Jan 2009, at 10:30, Gaurav Sharma wrote: Hi All I am new to BlackBook Gem , and i am really exited to implement this utility in my web application to enable the users of my website to fetch their contacts from the AOL , Yahoo , Gmail etc. My Application is implemented in PHP. So please suggest me how to use blackbook gem with my existing PHP application. It's a ruby library. You can only access it from ruby, so I suggest you learn some ruby Fred Hi Fred Thanks for your response , can i embed this ruby application in my PHP application.?? -- 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 Hosting
Pete, Since you have multiple apps, you should look for a provider that offers Passenger. I had a similar setup whith 3 apps, each run by 4 mongrels. Result: out of memory! With Passenger you don't waste resources on apps without traffic at any given moment. Cheers, Sazima On Jan 6, 5:35 pm, pete peterbattag...@gmail.com wrote: Hi- I've done some searching, but since there are many options, I'd like to get some feedback from the group at large. I have a couple of Rails apps that will likely not see too much traffic and I would like to find a public home for them. Since these sites are not generating any revenue for me, I'd like to find a less expensive home. Anyone have a suggestion, or know of a good resource, for a good, less- expensive hosting service to get up and running? 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: RoR, Apache2, fcgid and ubuntu...
Zeba, You should either use mongrel or passenger. Cheers, Sazima On Jan 7, 4:05 am, ZebaMomin jeba.mo...@gmail.com wrote: I'm using the module fcgid with apache and so along with it I need the fcgi gem. I tried using fastcgi module but it would crashso I switched to fcgid which is much reliable than fastcgi... I've also installed and used phusion passenger and ruby enterprise edition...but no use It too gives me a 404 error:-(( Can you please suggest any other way in which I can SUCCESSFULLY deploy my rails application on apache? Thanks. Bobnation wrote: I guess my question would start with this: why are you using fcgi? On Jan 6, 2:57 am, ZebaMomin jeba.mo...@gmail.com wrote: Hi. I'm trying to deploy my rails application on ubuntu server using apache2 and fcgid..but have not been successful.. I am using ruby 1.8.6, rails 2.2.2 and fcgi 0.8.7 gem... I am able to start apache successfully and view the Aptana RadRails welcome page..But giving my controller's name gives me a 404 error... I have made required changes in my /public/.htaccess and /public/dispatch.fcgi filesas= .htaccess(w/o comments) AddHandler fastcgi-script .fcgi AddHandler fcgid-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI dispatch.*fcgi* RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 h2Application error/h2Rails application failed to start properly dispatch.fcgi #!/usr/bin/ruby require File.dirname(__FILE__) + /../config/environment require 'fcgi_handler' require 'rubygems' require_gem 'fcgi' RailsFCGIHandler.process! I am attaching my httpd.conf file... I have checked that my VirtualHost works perfectly...but it doesn't seem to start my rails application Can someone please tell me where am I going wrong Thanks in advance.. -- View this message in context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562... Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- View this message in context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562... Sent from the RubyOnRails Users mailing list archive at Nabble.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: RoR, Apache2, fcgid and ubuntu...
On Jan 7, 4:05 am, ZebaMomin jeba.mo...@gmail.com wrote: I'm using the module fcgid with apache and so along with it I need the fcgi gem. I tried using fastcgi module but it would crashso I switched to fcgid which is much reliable than fastcgi... I've also installed and used phusion passenger and ruby enterprise edition...but no use It too gives me a 404 error:-(( Can you please suggest any other way in which I can SUCCESSFULLY deploy my rails application on apache? Thanks. Bobnation wrote: I guess my question would start with this: why are you using fcgi? On Jan 6, 2:57 am, ZebaMomin jeba.mo...@gmail.com wrote: Hi. I'm trying to deploy my rails application on ubuntu server using apache2 and fcgid..but have not been successful.. I am using ruby 1.8.6, rails 2.2.2 and fcgi 0.8.7 gem... I am able to start apache successfully and view the Aptana RadRails welcome page..But giving my controller's name gives me a 404 error... I have made required changes in my /public/.htaccess and /public/dispatch.fcgi filesas= .htaccess(w/o comments) AddHandler fastcgi-script .fcgi AddHandler fcgid-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI dispatch.*fcgi* RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 h2Application error/h2Rails application failed to start properly dispatch.fcgi #!/usr/bin/ruby require File.dirname(__FILE__) + /../config/environment require 'fcgi_handler' require 'rubygems' require_gem 'fcgi' RailsFCGIHandler.process! I am attaching my httpd.conf file... I have checked that my VirtualHost works perfectly...but it doesn't seem to start my rails application Can someone please tell me where am I going wrong Thanks in advance.. -- View this message in context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562... Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- View this message in context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562... Sent from the RubyOnRails Users mailing list archive at Nabble.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: Quick one! -- Project Messages!!
Ryan, If I understood correctly, he already has an index action that shows truncated messages. He asked for a 2nd page to show the whole content of all messages. He would probably be better off using a nested route for only 1 action (index) and retrieving the rest of the message asynchronously with AJAX on-demand, but that might be too much at once. Cheers, Sazima On Jan 5, 7:05 pm, Ryan Bigg radarliste...@gmail.com wrote: Woah. Firstly, why are you calling .collect on project.messages and everything? This is unnecessary. Secondly, if messages is an association for a project it would be better if you used nested routes, as explained here:http://guides.rails.info/routing_outside_in.html . Your controller would be called messages_controller and the action would be called index, not messages. - Ryan Bigg Freelancerhttp://frozenplague.net On 06/01/2009, at 6:02 AM, Dave Smith wrote: Sazima wrote: 1. Route (config/routes.rb): map.with_options(:controller = 'messages') do |m| m.messages '/messages', :action = 'messages' end 2. Action (app/controllers/messages_controller.rb): def messages # Retrieve messages the same way you did in the index action end 3. View (app/views/messages/messages.html.erb) = do the same as in index, but showing the whole message... Cheers, Sazima On Jan 5, 3:20 pm, Dave Smith rails-mailing-l...@andreas-s.net im slightly confused. i was returning the messages in the projects controller by doing @project_messages = @project.messages.collect -- 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: Quick one! -- Project Messages!!
Do you want the second page to contain all the messages or just 1 message? Cheers, Sazima On Jan 5, 8:40 am, Dave Smith rails-mailing-l...@andreas-s.net wrote: Hi Guys, The answer to this is probably pretty simple but I have an app which holds projects, and have messages for each project. project has_many messages message belongs to project in my project controller i just do @project_messages = @project.messages.collect In my project view page you can see the messages (but they are truncated to save space). I want to have a more link that takes the user to another page which holds all the full project messages. Do I create a page called messages.html.erb? I would also like to be able to comment on each of the messages on the second page!?!? Please can someone help me as I am a really stuck! Thank you very much!! Dave -- 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: Quick one! -- Project Messages!!
If this 2nd page you want will contain only 1 message, then it is the standard show action + view... Otherwise you can add a named route and use whatever name you want for the action and view. But it can be trickier to add comments. Cheers, Sazima On Jan 5, 3:05 pm, Dave Smith rails-mailing-l...@andreas-s.net wrote: Sazima wrote: Do you want the second page to contain all the messages or just 1 message? Cheers, Sazima On Jan 5, 8:40 am, Dave Smith rails-mailing-l...@andreas-s.net ? -- 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: Advanced authenticated system
Did you see: http://railscasts.com/episodes/123-subdomains ? Cheers, Sazima On Jan 5, 11:58 am, Konstantin rasf...@gmail.com wrote: I have tried 2 plugins: subdomain-fu + Restful authentication, currently without any success. If you have a working example for this issue - it will be highly appreciated! --~--~-~--~~~---~--~~ 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: Quick one! -- Project Messages!!
1. Route (config/routes.rb): map.with_options(:controller = 'messages') do |m| m.messages '/messages', :action = 'messages' end 2. Action (app/controllers/messages_controller.rb): def messages # Retrieve messages the same way you did in the index action end 3. View (app/views/messages/messages.html.erb) = do the same as in index, but showing the whole message... Cheers, Sazima On Jan 5, 3:20 pm, Dave Smith rails-mailing-l...@andreas-s.net wrote: Sazima wrote: If this 2nd page you want will contain only 1 message, then it is the standard show action + view... Otherwise you can add a named route and use whatever name you want for the action and view. But it can be trickier to add comments. Cheers, Sazima On Jan 5, 3:05 pm, Dave Smith rails-mailing-l...@andreas-s.net ok if for now i say i just want all messages, no comments. how would i go about adding the named route and view? -- 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] REE installed working, but rubygems load error persists in cmdline
Gents, After a LOT of struggling, I managed to install REE + Passenger on Solaris and everything seems to work when Passenger serves the applications. But there's one annoying details still pending: when I invoke rails from the cmdline (for example: rails -v) it fails due to rubygems load error (require 'rubygems'). Why does it work under Passenger and not in the cmdline? Any clues on what's wrong? Cheers, Sazima --~--~-~--~~~---~--~~ 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: Installing RoR for a Newbie is a nightmare
Try Instant Rails, just download unzip! Cheers, Sazima On Jan 3, 12:46 am, squashua squashrichard...@gmail.com wrote: Hi, I'm a newbie who's tried over a half dozen times now to install the full Ruby and All-in-One RoR app for my Windows XP machine. Frustratingly, I haven't been able to ever correctly get the programs to load and work. I've tried the RoR site, youtube tutorials, and other assorted websites for an easy to follow and ACCURATE description. Often times the problem is in getting gem to load, or getting the application to work, or other assorted problems that a newbie like myself might not be able to troubleshoot. I've also tried connecting to the RoR community using the IRC but to no avail. Should I just quit before ever having really begun? I'm stubborn so I'll probably keep at it, but I'd love to hear of any good resources if you know of any. Thanks, Squashua --~--~-~--~~~---~--~~ 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: How to get one columns as an array from database
Zhao, I think the most straightforward way is using columns.map (Project.columns.map { |c| puts c.name }), just like the inspect method of ActiveRecord: inspect() Returns a string like ‘Post id:integer, title:string, body:text‘ # File vendor/rails/activerecord/lib/active_record/base.rb, line 1348 1348: def inspect 1349: if self == Base 1350: super 1351: elsif abstract_class? 1352: #{super}(abstract) 1353: elsif table_exists? 1354: attr_list = columns.map { |c| #{c.name}: #{c.type} } * ', ' 1355: #{super}(#{attr_list}) 1356: else 1357: #{super}(Table doesn't exist) 1358: end 1359: end Cheers, Sazima On Dec 26, 3:27 am, Mohit Sindhwani mo_m...@onghu.com wrote: Zhao Yi wrote: Ryan wrote: I think it's been around since Rails 2.1 Project.first Project.last Project.all all work. I think the first last and all refers to rows. I want to select columns. If I'm not wrong, relational algebra doesn't identify a sequence between the elements of a row, i.e., I don't think it gives you the ability to select a column specifically. That said, you could probe for the schema and get the elements using that - something like how the dynamic scaffold used to work in earlier Rails. Cheers, Mohit. 12/26/2008 | 1:27 PM. --~--~-~--~~~---~--~~ 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: How to set onclick function for select_tag?
Zhao, Take a look at the excelent screencasts by Ryan Bates (specially episode #88 and others on AJAX, RJS and JQuery) at: http://railscasts.com/ Cheers, Sazima On Dec 26, 6:04 am, Zhao Yi rails-mailing-l...@andreas-s.net wrote: Phlip wrote: In HTML it's: onclick='Ajax.Request(...)' In Ruby that's :onclick = 'Ajax.Request(...)', natch. To get the ... part, write remote_function or link_to_remote into a web page and view its source. That will show you how to pack the Request arguments. -- Phlip Sorry I am new to rails and don't understand your comments. I have a select box and I want whenever its value changed, other text field value will change accordingly. Could you please give me an example for this? 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: help with counter_cache
Maybe s.items.count is zero? Cheers, Sazima On Dec 19, 5:01 am, Scott Kulik rails-mailing-l...@andreas-s.net wrote: Bryce Roney wrote: You can run a migration like this def self.up User.find(:all) do |u| u.update_attribute :items_count, s.items.count end end That will go through all your users and update the items_count field for all of them. ~~~ Bryce Roney [ twitter ][ blog ][ myspace ][ facebook ] i think i found the main issue. I think there is supposed to be an each in there like: def self.up User.find(:all).each do |u| u.update_attribute :items_count, u.items.count end end the weird thing is that now the migration is taking 8 seconds so it looks promising but the data is still not updated! if i change u.items.count to a constant like 1 it works fine, but it's not give me error messages and @user.items.count works in my views so i'm not sure what's wrong! ah well, i guess i'll take another look at it tomorrow morning. thanks for the help so far! hopefully someone can see my silly mistake. -- 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: How to iterate through an instance
Tom, You may try the inspect() way: inspect() Returns a string like ‘Post id:integer, title:string, body:text‘ # File vendor/rails/activerecord/lib/active_record/base.rb, line 1348 1348: def inspect 1349: if self == Base 1350: super 1351: elsif abstract_class? 1352: #{super}(abstract) 1353: elsif table_exists? 1354: attr_list = columns.map { |c| #{c.name}: #{c.type} } * ', ' 1355: #{super}(#{attr_list}) 1356: else 1357: #{super}(Table doesn't exist) 1358: end 1359: end Cheers, Sazima On Dec 17, 7:30 am, Tom Ha rails-mailing-l...@andreas-s.net wrote: Thanks a bunch, guys! -- 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: How to log in from console?
James, You can use Mechanize for this sort of things: http://github.com/tenderlove/mechanize/tree/master Cheers, Sazima On Dec 16, 1:25 pm, James Byrne rails-mailing-l...@andreas-s.net wrote: I am attempting to investigate the object state during a login process. I need instruction in the correct technique to emulate filling out an html form and submitting it within the rails console. Given a login form at /user_session/new with fields :username and :password and a submit button. $ script/console ... app.new_user_session_path = /user_session/new @params = { :password = 'mypassword', :username = 'myuser' } = {:password=mypassword, :username=myuser} Now, how do I submit this to the create action of the user_sessions_controller? -- 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: free ruby on rails hosting?
Heinz, Pay for a cheap Passenger host and you'll be happier in the end. Guaranteed! Cheers, Sazima On Dec 11, 9:54 pm, Jeremy McAnally jeremymcana...@gmail.com wrote: It actually does allow the same setup now thanks to Passenger. Dreamhost is proof of that. --Jeremy On Thu, Dec 11, 2008 at 4:01 PM, Bobnation boblmart...@gmail.com wrote: The issue with Ruby on Rails is that it is not simple a language, it really is a domain-specific language with its own requirements. Rails is a framework and so it does not follow the same sorts of setups as simply running PHP would. I still recommend looking for a cheap VPS and rolling your own from there. I think you would be happier in the end. On Dec 11, 3:59 pm, Heinz Strunk rails-mailing-l...@andreas-s.net wrote: Greg Donald wrote: On Thu, Dec 11, 2008 at 2:47 PM, Heinz Strunk rails-mailing-l...@andreas-s.net wrote: does anyone know any free ror webspace? I don't wanna have my computer running 24/7 for some small websites. http://letmegooglethatforyou.com/?q=free+ror+webspace -- Greg Donald http://destiney.com/ I of course tried google first but nothing found... Maybe that's the only option if there's no free ror webspace. -- Posted viahttp://www.ruby-forum.com/. --http://jeremymcanally.com/http://entp.com/http://omgbloglol.com My books:http://manning.com/mcanally/http://humblelittlerubybook.com/(FREE!) --~--~-~--~~~---~--~~ 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: News Roll
Jaikishan, There's no such thing in HTTP. The server can only answer client requests, not the other way around. Your 1st approach is correct, except your assumption of needing a separate thread. What Fred meant is that exactly that, you don't need a separate thread. Your regular Rails app should be more than capable to respond to these AJAX requests. Cheers, Sazima On Dec 11, 7:28 am, Jaikishan Jalan [EMAIL PROTECTED] wrote: Solving the similar problem, I am not sure if my previous approach was the right way. Another thing I could think of is that my server keeps sending data to my client side proactively for every 5 seconds. How that can be acheived in rails? On Thu, Dec 11, 2008 at 2:30 PM, Frederick Cheung [EMAIL PROTECTED] wrote: On 11 Dec 2008, at 02:53, Jaikishan Jalan wrote: However, as I understand that this thing needs to be implemented as a separate thread so that rest of the components on the webpage remains interactable. That's not true. Fred Is this the right approach to solve this or is there a better way to do it? -- Thanks, Jaikishan -- Thanks, Jaikishan --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: New to Rails... Help!
Jay, You're confusing Rails with InstantRails. Rails is the web framework, Instant Rails is a package containing Rails + web server + DB, etc. Google for Rails books, there are also plenty of suggestions in other topics in this group. Finally, if you have the time, I would start by 1st learning Ruby and then moving to Rails with AWDR, The Rails Way, etc. Cheers, Sazima On Dec 1, 10:44 pm, Jay Mark [EMAIL PROTECTED] wrote: William, thanks for your help in resolving this issue. It works great now. Thanks a lot. Please, if you know any good book or online material on Ruby/InstantRails 2.0.2, please post it in the Forum. Thanks Cypray wfisk wrote: class Country def people_tribes peoples.map{|p|p.tribe}.join(',') end end -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to redirect_to the index.html page
Pepe, Take a look at the API, you can redirect to an action, URL or plain text. Cheers, Sazima On Nov 29, 2:24 pm, Pepe Sanchez [EMAIL PROTECTED] wrote: hi all If I add in my code redirect_to :action = 'index' it redicrects to the index method in the current controller. how can I redirect it to the index.html page ? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Autodidacticism Collaboration with RoR
Just curious: why no phone calls? Cheers, Sazima On Nov 27, 9:56 am, Mr. Watson [EMAIL PROTECTED] wrote: Hello everyone, Does anyone want to learn Ruby on Rails from the ground up together? No phone calls. Only email and instant message. Thank you, --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Database password encryption
Pepe, Unless you have a secure dedicated HW (something along the lines of the HSMs used in the financial industry), just encrypting the password is no better, as the encryption key must be stored somewhere and you end up with exactly the same problem... Cheers, Sazima On Nov 27, 2:08 am, pepe [EMAIL PROTECTED] wrote: Thanks Brian Like you said, it's not the best answer in this case. The company policy has changed and these people are scrutinized by the government, so the encryption is pretty much a must do. I have two ideas to solve this: 1. Hack the 'establish_connection' method (wherever it is. I am not an expert...) and before the method is used decrypt the password already read from database.yml. 2. Create a class that would establish the connection from within the models I have themselves and forget about going the regular Rails way. I don't like either way and I was just hoping that somebody had already ran into this and had a better solution. Thanks for your suggestion, though. Pepe On Nov 26, 5:28 pm, Brian Hogan [EMAIL PROTECTED] wrote: If they're asking you to encrypt thepasswordin thedatabase.yml file itself, you kinda can't. I think the best you can do is secure the flle's read permissions so that it can only be read by the owner (which should be the process that runs the app.) If they can get access to that file and read its contents, chances are good that they can also start up the console, modify your ruby code, and change your app. The DBpasswordin that file is the least of your problems. I realize that might not be the best answer, but as I understand it, it's not possible to do dbpasswordencryptionout of the box. Anyone else know a better solution? On Wed, Nov 26, 2008 at 4:07 PM, pepe [EMAIL PROTECTED] wrote: Hello. I currently have an application deployed and running and just recently I have been asked to encrypt thedatabasepassword. Thepasswordis in thedatabase.yml file. What would be the easiest way of making this work? Thank you. Pepe --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Rakismet revisited :(
Schalk, Git on Windows is a different beast, try googling for it... Cheers, Sazima On Nov 24, 9:07 am, Schalk Neethling [EMAIL PROTECTED] wrote: Ok, I now installed git using: gem install git-rails Successfully installed fattr-1.0.3 Successfully installed arrayfields-4.6.0 Successfully installed main-2.8.3 Successfully installed git-rails-0.2.1 Successfully installed rubyforge-1.0.1 5 gems installed Installing ri documentation for git-rails-0.2.1... Installing ri documentation for rubyforge-1.0.1... Installing RDoc documentation for git-rails-0.2.1... Installing RDoc documentation for rubyforge-1.0.1... gem list confirms that it is installed. Tried Rakismet again: script/plugin install git://github.com/jfrench/rakismet No output, no error, no installation. Is there something one needs to do after installing the git plugin? Thanks, Schalk Schalk Neethling wrote: hehehehe, no I don't. Frederick Cheung wrote: There's an obvious question: do you have git installed ? What happens if you just run git from the command prompt ? Fred On 23 Nov 2008, at 20:41, Schalk Neethling wrote: Hey Rick, Adding -v generates the following output: script/plugin -v install git://github.com/jfrench/rakismet Plugins will be installed using http git clone --depth 1 git://github.com/jfrench/rakismet C:/DEVELOPMENT/osc/vendor/plugins/rakismet removing: C:/DEVELOPMENT/osc/vendor/plugins/rakismet/.git Thanks, Schalk Rick wrote: Schalk, The install worked fine in this environment: Ruby version 1.8.7 (powerpc-darwin9) RubyGems version 1.3.1 Rails version 2.1.2 Active Record version 2.1.2 Action Pack version 2.1.2 Active Resource version 2.1.2 Action Mailer version 2.1.2 Active Support version 2.1.2 Application root /Users/rick/test212 Environment development Database adapter sqlite3 Database schema version 0 I'm assuming that C:/DEVELOPMENT/osc is the root of your rails application. You might try adding the -v option to plugin to see if you can get more information on what's happening. Rick On Nov 23, 2:56 am, Schalk Neethling [EMAIL PROTECTED] wrote: Hey all, Ok it seems that I got my one app upgraded to 2.1.2 successfully. Yeah! Now, when I try to install the Rakismet plugin I get the following: script/plugin install git://github.com/jfrench/rakismet script/plugin install git://github.com/jfrench/rakismet removing: C:/DEVELOPMENT/osc/vendor/plugins/rakismet/.git Basically the plugin is not installed at all :( Seems that something is wrong here, not sure what I am doing wrong. Also, on a slightly different subject, what would be the better option 1) Continue trying until I get Rakismet working or, 2) Rather use the Plugin and method of Railscast here:http://railscasts.com/episodes/65 Thanks again to everyone for your assistance, Schalk --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Speed up counting?
Man, you should really take a look at: http://api.rubyonrails.org/classes/ActiveRecord/Calculations/ClassMethods.html Cheers, Sazima On Nov 19, 7:46 am, Günther Lackner [EMAIL PROTECTED] wrote: Hello! I need to speed up a count of apearances of a distinct category of entities in a table. I get the categories with the following command: @asset_classes = ActiveRecord::Base.connection.select_values SELECT DISTINCT CLASS FROM SymbolsMatch_MASTER ORDER BY CLASS Now I need to create a list of this categories together with the number of apearance in the table. Momentarily I use this syntax but it is VERY slow. ul % for asset_class in @asset_classes do % % count = DeviceToUpdate.find(:all, :conditions = [status like 'moreinfo' and CLIENT_STATUS is NULL and CLASS like ?,asset_class ] ).count if count 0 % li a href=%= url_for(:controller = :more_info, :action = :show_class, :class_name = asset_class) %%= truncate(asset_class, 20, .) % (%= count.to_s %)/a /li % end % % end % /ul Thank you for any suggestion how to speed this up! lacky -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Rails site for mobile devices too
Hi Fred, The audience is the average Internet user. Any idea on what mobile browser capabilities to expect? Do you think WML is mandatory or can we stick to xHTML? How did you generate xHTML views? Did you use any specific editor / IDE? Finally, how do you differentiate between your users? Cheers, Sazima On Nov 11, 12:09 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On 11 Nov 2008, at 13:58, Ricardo Sazima wrote: Guys, Need help on how to serve pages for mobile devices. Can someone point out a couple of references to start? I've been reading some materials and already have a couple of questions: 1. Is WAP (WML) still needed or can we go directly to XHTML-MP? I mean do the majority of mobile browsers already understand XHTML-MP? What is it's acceptance and spread? 2. Any generators for XHTML-MP views? Coding by hand is quite arduous... The mobile stuff I've done has been plain old xhtml mobile profile stuff. I'm sure there are old-skool wap phones still out there though. To an extent it depends on your target market, eg if you're primary target is business people then making sure it works well on a blackberry is probably more important than worrying about wap 3. How to handle login and sessions? I mean, does the mobile device sends it's telephone number? Or any other unique identifier? Is it capable of accepting storing cookies? Mobile devices tend to be a lot stricter as to how many cookies they will store and things like that. Phones do not send a unique id or their phone number, but companies likehttp://bango.com/have deals with the mobile network operators that allow them to identify people (last time I looked it thought everyone using opera mini was in norway (because opera mini proxies traffic through servers in norway) and had trouble with iphones. Fred Thanks in advance for the help! Cheers, Sazima --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails site for mobile devices too
Guys, Need help on how to serve pages for mobile devices. Can someone point out a couple of references to start? I've been reading some materials and already have a couple of questions: 1. Is WAP (WML) still needed or can we go directly to XHTML-MP? I mean do the majority of mobile browsers already understand XHTML-MP? What is it's acceptance and spread? 2. Any generators for XHTML-MP views? Coding by hand is quite arduous... 3. How to handle login and sessions? I mean, does the mobile device sends it's telephone number? Or any other unique identifier? Is it capable of accepting storing cookies? Thanks in advance for the help! Cheers, Sazima --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Rails site for mobile devices too
So, cookies work after all? Any special way of setting it and/or handling? Cheers, Sazima On Nov 11, 2:41 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On 11 Nov 2008, at 16:32, Sazima wrote: Hi Fred, The audience is the average Internet user. Any idea on what mobile browser capabilities to expect? Do you think WML is mandatory or can we stick to xHTML? No idea, not really my area of expertise How did you generate xHTML views? Did you use any specific editor / IDE? rails does xhtml anyway. Finally, how do you differentiate between your users? We have a slightly peculiar setup but at the end of the day we decided cookies were enough. Cheers, Sazima On Nov 11, 12:09 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On 11 Nov 2008, at 13:58, Ricardo Sazima wrote: Guys, Need help on how to serve pages for mobile devices. Can someone point out a couple of references to start? I've been reading some materials and already have a couple of questions: 1. Is WAP (WML) still needed or can we go directly to XHTML-MP? I mean do the majority of mobile browsers already understand XHTML-MP? What is it's acceptance and spread? 2. Any generators for XHTML-MP views? Coding by hand is quite arduous... The mobile stuff I've done has been plain old xhtml mobile profile stuff. I'm sure there are old-skool wap phones still out there though. To an extent it depends on your target market, eg if you're primary target is business people then making sure it works well on a blackberry is probably more important than worrying about wap 3. How to handle login and sessions? I mean, does the mobile device sends it's telephone number? Or any other unique identifier? Is it capable of accepting storing cookies? Mobile devices tend to be a lot stricter as to how many cookies they will store and things like that. Phones do not send a unique id or their phone number, but companies likehttp://bango.com/havedeals with the mobile network operators that allow them to identify people (last time I looked it thought everyone using opera mini was in norway (because opera mini proxies traffic through servers in norway) and had trouble with iphones. Fred Thanks in advance for the help! Cheers, Sazima --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Rails site for mobile devices too
Hi Fred, Thanks for the help and patience! I'm almost getting what I need, but 2 things are still missing (XHTML views and cookies/sessions). Can you provide a short example for them? 1. rails does xhtml anyway 2. Same as normal, but like I said mobile browsers are likely to be more stringent when it comes to stopping you going overboard = how do you set sessions and retrieve values? It's really not working for me... Cheers, Sazima On Nov 11, 3:29 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On 11 Nov 2008, at 17:05, Sazima wrote: So, cookies work after all? Any special way of setting it and/or handling? Same as normal, but like I said mobile browsers are likely to be more stringent when it comes to stopping you going overboard (or just deleting old cookies because they only allocate a small amount of space to cookies). Fred Cheers, Sazima On Nov 11, 2:41 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On 11 Nov 2008, at 16:32, Sazima wrote: Hi Fred, The audience is the average Internet user. Any idea on what mobile browser capabilities to expect? Do you think WML is mandatory or can we stick to xHTML? No idea, not really my area of expertise How did you generate xHTML views? Did you use any specific editor / IDE? rails does xhtml anyway. Finally, how do you differentiate between your users? We have a slightly peculiar setup but at the end of the day we decided cookies were enough. Cheers, Sazima On Nov 11, 12:09 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On 11 Nov 2008, at 13:58, Ricardo Sazima wrote: Guys, Need help on how to serve pages for mobile devices. Can someone point out a couple of references to start? I've been reading some materials and already have a couple of questions: 1. Is WAP (WML) still needed or can we go directly to XHTML-MP? I mean do the majority of mobile browsers already understand XHTML- MP? What is it's acceptance and spread? 2. Any generators for XHTML-MP views? Coding by hand is quite arduous... The mobile stuff I've done has been plain old xhtml mobile profile stuff. I'm sure there are old-skool wap phones still out there though. To an extent it depends on your target market, eg if you're primary target is business people then making sure it works well on a blackberry is probably more important than worrying about wap 3. How to handle login and sessions? I mean, does the mobile device sends it's telephone number? Or any other unique identifier? Is it capable of accepting storing cookies? Mobile devices tend to be a lot stricter as to how many cookies they will store and things like that. Phones do not send a unique id or their phone number, but companies likehttp://bango.com/havedeals with the mobile network operators that allow them to identify people (last time I looked it thought everyone using opera mini was in norway (because opera mini proxies traffic through servers in norway) and had trouble with iphones. Fred Thanks in advance for the help! Cheers, Sazima --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Update action | NoMethodError | nil.to_sym
Miked, Basically your var @employee is nil when you pass it to form_for(). That means Employees.find(params[:id]) is returning nil (either is not working, or the :id doesn't exist)... As Patrick put, the model name is not standard (should be Employee) and finding by hand may also help. Cheers, Sazima On Oct 25, 4:32 pm, Miked [EMAIL PROTECTED] wrote: Ok, totally no reason why I'm getting an error in this model update and no other. HELP! CONTROLLER: # GET /employees/1/edit def edit @employee = Employees.find(params[:id]) end VIEW: h1Edit Employee/h1 div id=main-sub %= error_messages_for :employees % % form_for(@employee) do |f| % table width=600 border=0 tr td class=labelEmail: /td td%= f.text_field :email % (required, will be login to intranet) /td /tr ROUTES: map.resources :employees All pretty standard stuff - what's going on? ERROR: NoMethodError in Employees#edit Showing employees/edit.html.erb where line #5 raised: You have a nil object when you didn't expect it! The error occurred while evaluating nil.to_sym Extracted source (around line #5): 2: div id=main-sub 3: %= error_messages_for :employees % 4: 5: % form_for(@employee) do |f| % 6: table width=600 border=0 7: tr 8: td class=labelEmail: Thanks so much in advance! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: 3 different areas, 1 yield?!
Heinz, You should really take a look at this: http://www.railsdev.ws/blog/3/modular-page-assembly-in-rails/ Cheers, Sazima On Oct 22, 1:35 pm, Heinz Strunk [EMAIL PROTECTED] wrote: Hello, I'm having a problem which is following: div id=headerimg .../div div id=navigation[STUFF FROM THE DB]/div div id=submenu[STUFF FROM THE DB]/div div id=content%= yield %/div div id=footer[STUFF FROM THE DB]/div How can I fill the [STUFF FROM THE DB] div's when I only have one single yield? I can't think of any possible solution... -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: So many users, so little time - looking for a better way
Jeff, You could use the same approach as Ryan in his last backgournd job screencast: http://railscasts.com/episodes/129-custom-daemon. Or take a look at some scheduler for the task (already passing the specific user information). I spent some time researching background tasks, my notes might help you: BACKGROUND PROCESSES http://wiki.rubyonrails.org/rails/pages/HowToRunBackgroundJobsInRails == Asynchronous Tasks Launched from Rails request/reponse cycle + optional Message Queueing - Options . ar_mailer (only for emails) = GOOD (only email) . starling + workling = EXCELLENT . Ap4r . Spawn / background= SIMPLE . ActiveMessaging . BackgroundFu . WorkerQueue . Rake in Background= SIMPLES (http://railscasts.com/episodes/127-rake-in-background) == Recurring Jobs (cron-style) Scheduled or permanently running in the background - Options . daemon_generator (rails_cron) = SIMPLE http://railscasts.com/episodes/129-custom-daemon . BackgrounDRb . rufus-scheduler = GOOD . Taskr . UNIX Cron and Runner (simple, but consumes resources and you can't controll well) Cheers, Sazima On Oct 21, 12:33 am, Jeff Pritchard [EMAIL PROTECTED] wrote: OK, time to come clean. Right now my app is doing something really cheesy. The first step is alway admitting that you have a problem, right? So here's the deal. One of the features of my app is that, based on some user settings, it is supposed to send out reminder emails at certain times of the day. Each user has their own time settings for these reminders. Right now I have a background task that, once every 15 mins, looks at every gosh darn user and decides whether or not to send them a reminder. Once every 15 mins I hit every single user row in the database. brrr. Yeah, I know, gives me the willies too. So is there some sort of a best practice established for how to do some caching/intelligent-scheduling to overcome this horrendous mis-use of the database? Is there some sort of a plugin that would allow me to sort the database by that time-of-day column and intelligently find just those within a certain range of times? I'm very nearly an SQL virgin, so if this is painfully simple and I'm just a moron, be gentle. thanks, jp -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: How do I only show items that belong to a certain user?
@user.documents Cheers, Sazima On Oct 19, 7:06 pm, David Smit [EMAIL PROTECTED] wrote: I have a web application with users and their documents. Each user can have many documents: user.rb: has_many :documents document.rb: belongs_to :user document_controller.rb: def index @documents = Document.find(:all) end I am using the restful_authentication plugin. Here is my question: How do I get the controller to only show documents that belongs to each user? Right now it shows all the documents for all the users. I am using the latest version of Rails. -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Track number of clicks on a link
Hey Dan, Why don't you pass an unique ID parameter in each link (either GET or POST) and use this in a before_filter in the application controller? The filter would just increment the count for that ID in a separate table. This is a general design that would work for anything. Later you can use this information with some sort of mapping that says what each ID means (or just put a title for each ID in the table). Something like: == Links a href=http://mysite.com?ID=1;Link 1/a == application.rb before_filter :inc_link_count def inc_link_count li = Link.find(params[:ID]) li.count++ li.save end Cheers, Sazima On Sep 25, 7:45 pm, andres [EMAIL PROTECTED] wrote: On Thu, 2008-09-25 at 13:52 -0700, Dan Paul wrote: Thanks for the response, sorry I'm totally new to this any way you can elaborate or show example? Any help would be greatly appreciated, thanks in advance On Sep 25, 11:53 am, andres [EMAIL PROTECTED] wrote: On Thu, 2008-09-25 at 11:35 -0700, Dan Paul wrote: Hello, So I am trying to simply track the number of hits a link has received and display that number on the site so other users can see which links are more popular. So once the link is clicked on it adds a +1 value to the hits column in the database and then redirects the person to the url that the link is supposed to go to. So far this is what I have. I have a tutorials table in my database and a column for hits and a column for url. ** tutorials_controller.rb ** def update_hits_count [EMAIL PROTECTED] :hits, params[:count].size + 1 if @tutorial.save redirect_to url_for(@tutorial.url) end end modify the method so it suits any controller, like in self.update_attribute add the method to application_controller whenever you want to add a hit you call it, like in def index update_hits_count end it really depends on what you want to track hits on a single controller/action (probably writing on a file) or in many more likely you'll need a tracking model hits that has something like controller :string action :string hits :integer define a addhit method on the model self.hits = self.hits +1 create a method in application controller def update_hit_counts @hit.find(:first, :controller = controller, :method = method) @hit.addhit (you can use the current method and controller form rails environmental variables) then when you want to register a hit inside the method you call update_hit_counts (ads one query and one write per request) ** view/tutorials/show.html.erb ** % for tutorial in @tutorials % %=link_to tutorial.title, {:action = 'update_hits_count', :count = tutorial.hits} % % end % That is what I have so far and when you click on the link the hits column in the tutorials table just gets set to null and it does not redirect them to the proper url. Any help would be greatly appreciated. Thanks in advance. -- smime.p7s 7KViewDownload -- Andres Paglayan CTO, StoneSoup LLC Ph: 505 629-4344 Mb: 505 690-2871 FWD: 65-5587 Testi. Codi. Vinci. smime.p7s 7KViewDownload --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---