[Rails] Re: Maxima and Ruby Integration
I tried the following but i'm getting errors...am I missing something here? >> f = IO.popen("maxima") => # >> f.puts "1+1;" IOError: not opened for writing from (irb):7:in `write' from (irb):7:in `puts' from (irb):7 >> f.close_write IOError: closing non-duplex IO for writing from (irb):8:in `close_write' from (irb):8 -- Posted via http://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: Cannot get webrick to start on Mac OS 10.5.6
Have you tried: sudo gems update --system Also, to install RubyGems from the source you need to add sudo: sudo ruby setup.rb On Jan 29, 7:03 pm, jslicari wrote: > Hi. I'm am new to Ruby on Rails and I'm trying to get my environment > up and running. I know that Ruby and Rails are pre installed on Mac > OS 10.5 but I was having some problems. I went and updated everything > with gem update --system, gem update, etc. However: > > [Macintosh:rails/work/demo] jslicari% ruby script/server > Rails requires RubyGems >= . Please install RubyGems and try > again:http://rubygems.rubyforge.org > > Doesn't even tell me what version it needs. But: > > [Macintosh:rails/work/demo] jslicari% gem env > RubyGems Environment: > - RUBYGEMS VERSION: 1.3.1 > - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal- > darwin9.0] > - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 > - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/ > Versions/1.8/usr/bin/ruby > - EXECUTABLE DIRECTORY: /usr/bin > - RUBYGEMS PLATFORMS: > - ruby > - universal-darwin-9 > - GEM PATHS: > - /Library/Ruby/Gems/1.8 > - /Users/jslicari/.gem/ruby/1.8 > - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ > ruby/gems/1.8 > - GEM CONFIGURATION: > - :update_sources => true > - :verbose => true > - :benchmark => false > - :backtrace => false > - :bulk_threshold => 1000 > - REMOTE SOURCES: > -http://gems.rubyforge.org/ > > So RubyGems seems to be here with the latest and greatest version. > Something seems to be very out of sync here but I can't figure out > what. > > I also tried downloaded rubygems 1.3.1 and installing it again but > that crashes: > > [Macintosh:~/desktop/rubygems-1.3.1] jslicari% ruby setup.rb > ./lib/rubygems.rb:723:in `set_paths': uninitialized constant Gem::Etc > (NameError) > from ./lib/rubygems.rb:719:in `each' > from ./lib/rubygems.rb:719:in `set_paths' > from ./lib/rubygems.rb:526:in `path' > from ./lib/rubygems/source_index.rb:66:in > `installed_spec_directories' > from ./lib/rubygems/source_index.rb:56:in `from_installed_gems' > from ./lib/rubygems.rb:736:in `source_index' > from ./lib/rubygems/gem_path_searcher.rb:86:in `init_gemspecs' > from ./lib/rubygems/gem_path_searcher.rb:21:in `initialize' > from ./lib/rubygems.rb:684:in `new' > from ./lib/rubygems.rb:684:in `searcher' > from ./lib/rubygems.rb:683:in `synchronize' > from ./lib/rubygems.rb:683:in `searcher' > from ./lib/rubygems/custom_require.rb:34:in `require' > from /sw/lib/ruby/1.8/tmpdir.rb:12 > from ./lib/rubygems/custom_require.rb:31:in `gem_original_require' > from ./lib/rubygems/custom_require.rb:31:in `require' > from setup.rb:95 > > I'm out of ideas. > > 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: Error logging in a database / case system
If you are referring to errors generated from your web site, you might want to look at the exception logger plugin: http://github.com/defunkt/exception_logger/tree/master It logs all exceptions to a handy web based interface complete with RSS feeds. It might be a good starting point. Sheldon On Jan 31, 3:40 pm, Andrew Thorp wrote: > Just wondering what the best way to set up custom error logging in rails > is. > > I was thinking we would store errors in our database, with a generated > case #, so that our users could call our support and we could reference > the error they had. > > I was wondering if this makes sense, or if there is a better way to do > it. > > If this does make sense, could someone point me in the direction of > someone who has already done it? > > I can create one that we use ourselves, but I was just wondering if > there is any sophisticated ones out there for me to check out! > > 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: form_remote_for can do :put
Ed Hickey wrote: > On 1/23/07, Adam Madd wrote: >> > Tim > I can't get that to work for me. I 've been using the :html hash for > passing the PUT method as a hidden field. I've found this method in the > Beast forum and it seems to work. Though, it does seem like you should > be > able to pass the :method param and have it override POST. > > Anyone else have experience with this? > > Ed I was having a similar problem and in the end it was because prototype.js wasn't loading and it was sending the form request as GET instead of POST (or pseudo PUT depends on how you want to think about it) in my .htaccess I added this rule RewriteCond %{REQUEST_URI} ^/javascripts.* RewriteRule .* - [L] Which allowed prototype.js to load and it worked. Hope this helps someone! -- Posted via http://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: What and where is the method register! in restful authentication?
Thanks Ramon, Never heard of finite state machines or acts_as_state_machine before, I have been chasing it on the web - more to learn. On Jan 31, 10:05 pm, Ramon Tayag wrote: > User acts as a state machine. Transitions automatically get methods > that are named after them with a "!" at the end. Look for a > transition called register and it shows from what state to what state > this "register" can occur. > > Ramon Tayag > > On Sat, Jan 31, 2009 at 5:15 PM, thomasalbert > > wrote: > > > A newbie question - I am learning restful authentication but I cant > > find what or where the method register! is when used in the following > > code: > > > @user.register! if @user && @user.valid? > > > 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: How to think in terms of MVC when designing a website.
I think it is possible that you might be missing the OP's point. (Or, equally possible, I read a completely different question in the original post.) I think that Nebs would like to create a website with both static and dynamic pages that has a consistent look and feel. It sounds like (s)he would like to adhere to the DRY principle and not have to duplicate things between the application.html.erb file and the static content files. How typical this is I have no idea (being a newbie myself), but that's what I read into the original question. One solution would be to write controllers that serve up the static content as if it were dynamic -- a funny sort of dynamic page in which nothing ever changes. I think that what (s)he is asking is, "Is this the right/best thing to do?" and "What do other folks do in this situation?" Unfortunately, I don't have any good answers to those questions. What little I know of HTML/CSS makes me know that it's possible to do an amazing amount changing the look and feel of a webstite using CSS (see http://www.csszengarden.com/). What little I know of RoR makes me know that when you involve controllers in serving up content, it slows things down. Since the developers of RoR are aware of this, they have added several different mechanisms to cache content so that things are slowed down as minimally as possible. Perhaps the OP doesn't care about speed, in which case the idea of using application.html.erb and CSS to define the common look & feel of the site, along with a "serve up the static content identified by the rest of the URL" controller will work fine. Perhaps that will be too slow, but by enabling caching of the pages served by that controller, the speed will be sufficient. Perhaps I am totally off base on what the original poster was asking. Regardless, it's late and I'm going to bed now :-) --wpd --~--~-~--~~~---~--~~ 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: Maxima and Ruby Integration
I Read up on some of my options, found that I can run maxima as a subprocess using: IO.popen("maxima") but how do I pass in arguments and get a response? After i start "maxima" i should be able to run "1 + 1;" and return the answer of "2"? Also, Is popen the best way to go about running this process? -- Posted via http://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] form.radio_button values
I'm using the radio_button form tag in my project, and I just recently switched to using i18n. I would like all of my database entries to be in english so I can parse evertyhing quickly, yet the code below doesn't quite work: <%= f.radio_button("part_of_speech", ["#{t 'noun'}", "Noun"]) %> Produces part_of_speech" "NounNoun", If the user is using french it shows up as "NomNoun". I Want the #{t 'noun'} to show to the user, but only the 'Noun' to be sent to my controller, how can I do this? I would post into the I18n section, but its much less read, and this is less an issue with i18n, and more with how to make this work as expected: f.radio_button("foo", ["show me","send me"] -- Posted via http://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 think in terms of MVC when designing a website.
Nebs Petrovic wrote: > Ok I understand what you're saying. I'm not just trying to design > everything before I get my feet wet, I've already started and I know how > to implement features when I can clearly see them fit into an MVC > "model". (BTW "Ok" is spelled "Okay" - it's a real word. OK is an historical backronym.) The amount of books you seem to have read to get here indicates you like researching before doing! > I just hit a roadblock (which is why I'm here) because I wanted to > accomplish a simple task like "ok, I have a "contact us" link, now I > want it to point to a page that displays contact information". Now my > question is, do I create a controller called ContactInfo and then use > its show method to display this page? Or should this page be a method > call of some other controller? Or none of the above? Do the simplest thing that could possibly work. Just keep telling yourself "You Aren't Gonna Need It." YAGNI. contact_us.html is just names and (shrouded) addresses, so throw it into public/ Its link is now link_to 'Contact Us', '/contact_us.html'. Put that into layout.html.erb, and you are done; all pages have it. > Hypothetical (and unrealistic) situation: Just think of a completly > static website with no control logic, just links to other static pages. > How would you do this with rails? Do you create a controller called > "Website" and have a method for each page? Or do you create a > controller for each page and use their show methods to display the > views? Or do you not even create controllers? The other good thing about YAGNI is it usually errs on the side of performance. Counterexamples abound, but in this case giving static HTML pages to your web server, without any Ruby code between them and your clients, is the most efficient technique! > Ok now stepping out of this hypothetical bubble. Let's say now my > website is filled with static pages but has the ability to login/logout > users (dynamic aspect). Now the user authentication I can deal with in > rails. My problem is how to handle the rest of that static stuff (the > other pages) while still being able to use the application.html.erb as a > layout for every page (including the static ones). Do you see what I > mean? Yes. You are my "onsite customer", and we just wrote a static website in HTML. Now you want logic, so I refactor it. Add the Salted Authentication plugin. Write tests that show some pages require users. (The plugin comes with the login_as test helper.) Use tidy -i -asxhtml --wrap 130 -m file.html to convert the HTML to XHTML (so it's compliant & testable). Fix every error and warning. Move the files from public to app/views/my_controller/ You only need one controller so far. Use routes.rb Pass all the tests, and write tests with assert_generates which check the routes are correct. Now tell me the next feature and I will sketch out the migration path for you! The point is to use tests to ensure that each change - from too simple to less simple - is safe and elegant, not a bunch of hacking and thrashing. -- 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: Where does index.html (home) fit into RoR?
On Sat, Jan 31, 2009 at 5:09 PM, Nebs Petrovic wrote: > Basically I want to know how to create a "home" page with rails (without > always having to type controller/action in the URL. And remarkably, on the default Rails "home" page are three points under "Getting started", the last being 3. Set up a default route and remove or rename this file Routes are setup in config/routes.rb. You might want to look at -- i.e., read the comments in -- that file. HTH, -- Hassan Schroeder hassan.schroe...@gmail.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] Where does index.html (home) fit into RoR?
The page that loads when no controller name is given in the URL is the public/index.html page (eg: http://localhost:3000/) Now this is a pure HTML page so I cannot use any link_to tags or yield tags, etc. My navigation bar is in my application layout (app/views/layouts/application.html.erb). This is what provides the ability to navigate. So how do I access this layout if the home page that loads is index.html which has no reference to any of my rails views? Basically I want to know how to create a "home" page with rails (without always having to type controller/action in the URL. Thanks in advance. -- Posted via http://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 think in terms of MVC when designing a website.
Phlip wrote: > Because a clean design typically falls into three layers, you don't need > to > guess, before coding, what the design should be. Write what you need, > based on > the behaviors you add to each page. Refactor towards DRY, and you will > have the > right things in the right layers, spontaneously. Ok I understand what you're saying. I'm not just trying to design everything before I get my feet wet, I've already started and I know how to implement features when I can clearly see them fit into an MVC "model". I just hit a roadblock (which is why I'm here) because I wanted to accomplish a simple task like "ok, I have a "contact us" link, now I want it to point to a page that displays contact information". Now my question is, do I create a controller called ContactInfo and then use its show method to display this page? Or should this page be a method call of some other controller? Or none of the above? Hypothetical (and unrealistic) situation: Just think of a completly static website with no control logic, just links to other static pages. How would you do this with rails? Do you create a controller called "Website" and have a method for each page? Or do you create a controller for each page and use their show methods to display the views? Or do you not even create controllers? Ok now stepping out of this hypothetical bubble. Let's say now my website is filled with static pages but has the ability to login/logout users (dynamic aspect). Now the user authentication I can deal with in rails. My problem is how to handle the rest of that static stuff (the other pages) while still being able to use the application.html.erb as a layout for every page (including the static ones). Do you see what I mean? -- Posted via http://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 1.9.1 Windows rake tasks problem
Holy thread resurrection batman! You need to be using edge rails. --~--~-~--~~~---~--~~ 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] YAML is sensitive to space character?
I ran script/generate model Book and I got: /usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 23, col 2: ` socket: /var/run/mysqld/mysqld.sock' (ArgumentError) from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:819:in `database_configuration' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:391:in `initialize_database' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:139:in `process' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run' from /home/kedar/Projects/ror/people/config/environment.rb:13 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:1 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from script/generate:3 then I realized that I had mistakenly had an entry password:secret instead of password: secret in database.yml. Is database.yaml so sensitive to a space character? I couldn't ascertain it by looking at http://www.yaml.org/refcard.html. -Kedar -- Posted via http://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 think in terms of MVC when designing a website.
Nebs Petrovic wrote: >> Always remember that once you carve your design into stone, you can >> never change >> it. So make sure you get the design right before you start carving! >> >> (This is a winkie: ;^) > > That's why I'm posting this thread. Then you didn't get my winkie. Software is soft. Write whatever works, with unit tests, and then refactor it (while running the tests), until the design is DRY. (Don't Repeat Yourself.) Because a clean design typically falls into three layers, you don't need to guess, before coding, what the design should be. Write what you need, based on the behaviors you add to each page. Refactor towards DRY, and you will have the right things in the right layers, spontaneously. Wall-to-wall unit tests are more important than a good design. If I had to select between working on two programs, one with an awesome design but no tests, the other with a bad design but wall-to-wall tests, I would choose the latter. But it's the designs without tests that get carved in stone. -- 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] restful search generator released
i want to announce the availability of "restful_search" generator. http://github.com/jzimmek/restful_search_generator take an activerecord model and let "restful_search" generate a search functionality for it (including controller, model, view and migration). please share your thought about it and tell me if you miss any "must- have" features. regards jan --~--~-~--~~~---~--~~ 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 think in terms of MVC when designing a website.
> > Always remember that once you carve your design into stone, you can > never change > it. So make sure you get the design right before you start carving! > > (This is a winkie: ;^) That's why I'm posting this thread. -- Posted via http://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 with apache virtual hosts, mongrel
Do you mean this statement? NameVirtualHost *:80 I have that there. The apache docs say that statement routes all traffic on port 80 to the virtual hosts. If thee is something I am missing please let me know. I have this: NameVirtualHost *:80 ProxyRequests Off ServerName employees DocumentRoot "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public" ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ ServerName turindata DocumentRoot "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/Turindata/public" RewriteEngine On ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ I go to this on each one: http://192.168.1.1/employees -> works http://192.168.1.1/turindata -> does not work On Sat, Jan 31, 2009 at 4:38 PM, Hassan Schroeder < hassan.schroe...@gmail.com> wrote: > > On Sat, Jan 31, 2009 at 2:21 PM, Chris Habgood wrote: > > Well the virtual host above works: > > No. It. Doesn't. It ONLY APPEARS TO. Do you understand the > concept of "default"? > > > I go to http://IP/employees > > As long as you insist on trying to configure "virtual hosts" and NOT > USING THE VIRTUAL HOST NAME, you are wasting your time. > > Last try: > > http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata > > NOT. THE. SAME. > > If you can't understand that, I give up. > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 2:21 PM, Chris Habgood wrote: > Well the virtual host above works: No. It. Doesn't. It ONLY APPEARS TO. Do you understand the concept of "default"? > I go to http://IP/employees As long as you insist on trying to configure "virtual hosts" and NOT USING THE VIRTUAL HOST NAME, you are wasting your time. Last try: http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata NOT. THE. SAME. If you can't understand that, I give up. -- Hassan Schroeder hassan.schroe...@gmail.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 think in terms of MVC when designing a website.
Nebs Petrovic wrote: > I've now decided to jump in and create a rails app from scratch. I'm a > little confused when it comes to going from concept to implementation > using MVC. I understand when to use models, pretty much whenever I have > an object that I want to store in a database or resource. > What I'm not sure about is when to create a controller. For basic tasks > like creating/editing users, sessions or objects it makes sense. But > what about other pages in my website that are not necessarily dealing > with CRUD on objects? Always remember that once you carve your design into stone, you can never change it. So make sure you get the design right before you start carving! (This is a winkie: ;^) --~--~-~--~~~---~--~~ 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] [SOLVED]: constant redefinition warning
I changed the creation + test to a simple get constant as it's already declared (being an ActiveRecord class created by Globalize plugin) a simple : globalize_class = Object.const_get "#{self.class.name}Translation" gives me the class... On 31 jan, 19:44, Erwin wrote: > I get a redefinition warning : > > log warning => > /Users/myself/Developpement/MyApp/vendor/plugins/globalize2/lib/myapp/ > validations.rb:18: warning: already initialized constant > RoleTranslation > > I am using the following code, apps is running well w warning > module Validations > def validate_translation_uniqueness_of(*attr_names) > translation_class = Object.const_set "#{self.class.name}Translation", > Class.new(::ActiveRecord::Base){} > ... > > I tried now to avoid it writing : > translation_class = Object.const_set "#{self.class.name}Translation", > Class.new(::ActiveRecord::Base){} unless defined?("#{self.class.name} > Translation") > but it fails ... (obviously don't like a string..) > > I also tried: > translation_class = Object.const_set "#{self.class.name}Translation", > Class.new(::ActiveRecord::Base){} unless defined?("#{self.class.name} > Translation".to_sym) > > "#{self.class.name}Translation".to_sym => :AccountingPeriodTranslation > which is also bad.. > > I need to have : #{self.class.name}Translation giving a class , how > should I write it ? > > defined?(AccountingPeriodTranslation) =>"constant" is what I should > test (or any other Translation class where is self.class > > thanks for your help > > erwin --~--~-~--~~~---~--~~ 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] How to think in terms of MVC when designing a website.
I'm fairly new to rails but I've read a book, many tutorials and watched video lectures so I'm starting to get a hang of how it works. I've now decided to jump in and create a rails app from scratch. I'm a little confused when it comes to going from concept to implementation using MVC. I understand when to use models, pretty much whenever I have an object that I want to store in a database or resource. What I'm not sure about is when to create a controller. For basic tasks like creating/editing users, sessions or objects it makes sense. But what about other pages in my website that are not necessarily dealing with CRUD on objects? For example if I have a website with multiple pages like "contact us" or "help" which don't deal with dynamic content but rather display just a static page of information. Is it common practice to create a controller for every page in my website (and use its 'show' method), even if they're static and "hard coded"? I would like to use a single application.html.erb layout for the entire website, so adding simple pages like "contact us" are confusing to me because I don't know if I should just create an html file somewhere or have rails generate a view via a "dummy" controller so that it can use the layout? Another question I have is regarding to the index.html page in the public folder. Is there a way to utilize the application.html.erb layout for this page as well? If not, how can I create a "home" page that sort of fits in with the rest of the application. Thanks for any help. -- Posted via http://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 with apache virtual hosts, mongrel
Well the virtual host above works: ServerName employees DocumentRoot "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public" ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ I go to http://IP/employees and I get the index page which is what it should do. The other one says: Routing Error No route matches "/turindata" with {:method=>:get} On Sat, Jan 31, 2009 at 4:16 PM, Hassan Schroeder < hassan.schroe...@gmail.com> wrote: > > On Sat, Jan 31, 2009 at 2:02 PM, Chris Habgood wrote: > > Ya, virtual hosts is what I am trying to do. here is the one that does > not > > work: Any ideas? > > It "doesn't work" because you haven't, as far as I can tell, tried it. > > http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata > > If you don't request the virtual server you've defined, what makes > you think that it will magically respond to some entirely different and > unrelated request URL? > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 2:02 PM, Chris Habgood wrote: > Ya, virtual hosts is what I am trying to do. here is the one that does not > work: Any ideas? It "doesn't work" because you haven't, as far as I can tell, tried it. http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata If you don't request the virtual server you've defined, what makes you think that it will magically respond to some entirely different and unrelated request URL? -- Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
Ya, virtual hosts is what I am trying to do. here is the one that does not work: Any ideas? ServerName turindata DocumentRoot "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/Turindata/public" RewriteEngine On Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ On Sat, Jan 31, 2009 at 3:48 PM, Hassan Schroeder < hassan.schroe...@gmail.com> wrote: > > On Sat, Jan 31, 2009 at 11:51 AM, Me wrote: > > > > Start page works but all of my links do not work. > > Right, you'll need to set a prefix on all your routes -- I've done that > once, but don't recall the incantation at the moment. Google should > help. > > Or, much easier, just use virtual hosts, like most folks do :-) > > -- > Hassan Schroeder hassan.schroe...@gmail.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] fckeditor and rails 2.2.2
Hi there after I upgraded to rails 2.2.2, i got the error -> undefined fckeditor_textarea method while it works fine on rails 2.1.0 any idea? --~--~-~--~~~---~--~~ 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 and Mysql
On Sat, Jan 31, 2009 at 8:56 AM, beardy wrote: > 1 - I want to use mysql rather than Sqlite. Whilst I have followed > the instruction on Hivelogic in "Installing Ruby, Rubygems, Rails, > and Mongrel on Mac OS X 10.5 (Leopard)" every time I create a new file > structure (e.g. rails example_application) and I then check the > database.yml file it still shows the db as sqlite3. `rails example_application -d mysql` is what you want. Assuming you have MySQL itself installed, of course. :-) BTW, simply typing `rails --help` would have answered your question. FWIW, -- Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 11:51 AM, Me wrote: > > Start page works but all of my links do not work. Right, you'll need to set a prefix on all your routes -- I've done that once, but don't recall the incantation at the moment. Google should help. Or, much easier, just use virtual hosts, like most folks do :-) -- Hassan Schroeder hassan.schroe...@gmail.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] Ruby on Rails and Mysql
I'm fairly new to programming and the mac and I really want to have a go at learning Ruby On Rails, I have followed the set up tutorial on Hivelogic and I have a problems that I just can't fathom out and I can't seem to put the right collection of words into Google to get a definitive answer. The problems is:- 1 - I want to use mysql rather than Sqlite. Whilst I have followed the instruction on Hivelogic in "Installing Ruby, Rubygems, Rails, and Mongrel on Mac OS X 10.5 (Leopard)" every time I create a new file structure (e.g. rails example_application) and I then check the database.yml file it still shows the db as sqlite3. Maybe there is no way of changing this and my expectation that something magical via the config in the tutorial will rewrite this to show mysql in the file is misguided??? I installed the mysql gem. Cheers, Mark. --~--~-~--~~~---~--~~ 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] auto_link issue with email address inside
I think there is a bug in auto_link_email_addresses, if an e-mail address is already linked. This works fine: <% p = "mailto:n...@test.com\";>n...@test.com" %> <%= auto_link(p) %> This fails: <% p = "mailto:n...@test.com\";>Some Other Text" %> <%= auto_link(p) %> And results in: mailto:rn...@test.com";>n...@test.com">Some Other Text Or do I overlook something? --~--~-~--~~~---~--~~ 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] Error logging in a database / case system
Just wondering what the best way to set up custom error logging in rails is. I was thinking we would store errors in our database, with a generated case #, so that our users could call our support and we could reference the error they had. I was wondering if this makes sense, or if there is a better way to do it. If this does make sense, could someone point me in the direction of someone who has already done it? I can create one that we use ourselves, but I was just wondering if there is any sophisticated ones out there for me to check out! Thanks! -- Posted via http://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] Guide to RESTful Rails?
Hi, I've bought Peepcode's RESTful Rails screencast. It's pretty interesting - and there are a couple of things I didn't know at all. Please where do I find some complex tutorial to RESTful Rails? In API? Or where? 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: rails with apache virtual hosts, mongrel
Start page works but all of my links do not work. On Jan 31, 11:10 am, Hassan Schroeder wrote: > On Sat, Jan 31, 2009 at 9:01 AM, Chris Habgood wrote: > > IP/app > > IP/app1 > > OK, dump all the virtual host stuff you're not using and under the > default host put something like: > > ProxyPass /app/http://localhost:3000/ > ProxyPassReverse /app/http://localhost:3000/ > > ProxyPass /app1/http://localhost:3001/ > ProxyPassReverse /app1/http://localhost:3001/ > > Done. > -- > Hassan Schroeder hassan.schroe...@gmail.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: has_many with different foreign key
s. shartles wrote: > In the User model: > has_many :properties > > In the Property model: > belongs_to :user, :class_name => "User", :foreign_key => > 'updated_by' > > > Here's what I see inside of the rails console: >>> prop = Property.first > => # >>> usr = User.first > => # >>> prop.user = usr > => # >>> prop.updated_by > => 1 >>> prop.updated_by.name > NoMethodError: undefined method `name' for 1:Fixnum > from (irb):5 >>> Yeah the fixnum error is because updated_by is just an integer field to rails. If you tried: prop.user = usr prop.user.name #=> "Sam Shartles" This should get you are trying to acheive: In the User model: has_many :properties, :foreign_key => 'updated_by' In the Property model: belongs_to :updated_by, :class_name => 'User', :foreign_key => 'updated_by' I must admit in the past I've tended to use 'updated_by_id' instead as your field name that way you can access both updated_by_id (returns int) and updated_by (returns user). You may also look at the userstamp plugin: http://github.com/delynn/userstamp/tree/master Cheers Luke -- Posted via http://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] constant redefinition warning
I get a redefinition warning : log warning => /Users/myself/Developpement/MyApp/vendor/plugins/globalize2/lib/myapp/ validations.rb:18: warning: already initialized constant RoleTranslation I am using the following code, apps is running well w warning module Validations def validate_translation_uniqueness_of(*attr_names) translation_class = Object.const_set "#{self.class.name}Translation", Class.new(::ActiveRecord::Base){} ... I tried now to avoid it writing : translation_class = Object.const_set "#{self.class.name}Translation", Class.new(::ActiveRecord::Base){} unless defined?("#{self.class.name} Translation") but it fails ... (obviously don't like a string..) I also tried: translation_class = Object.const_set "#{self.class.name}Translation", Class.new(::ActiveRecord::Base){} unless defined?("#{self.class.name} Translation".to_sym) "#{self.class.name}Translation".to_sym => :AccountingPeriodTranslation which is also bad.. I need to have : #{self.class.name}Translation giving a class , how should I write it ? defined?(AccountingPeriodTranslation) =>"constant" is what I should test (or any other Translation class where is self.class thanks for your help erwin --~--~-~--~~~---~--~~ 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] Drop down boxes issue in ROR.
Hi all, Can any one help me regarding, i want to select a country from one dropdown box and that corresponding states should display on another dropdown box. help me ASAP. Thanks, Anil. -- Posted via http://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: Customizing Model Data -- Inside Model or View or Helper?
On Sat, Jan 31, 2009 at 10:06 AM, Randy Kramer wrote: > Off the point, but before we allow a word like commified to escape into > the wild (see usage in next post by Rob Lacey), we spell it commafied > instead--there is a slightly greater chance of guessing its intended > meaning. And even greater: `acts_like_last_name_comma_first_name` :-) -- Hassan Schroeder hassan.schroe...@gmail.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: Customizing Model Data -- Inside Model or View or Helper?
On Friday 30 January 2009 09:31 pm, ericindc wrote: > commified_name Off the point, but before we allow a word like commified to escape into the wild (see usage in next post by Rob Lacey), we spell it commafied instead--there is a slightly greater chance of guessing its intended meaning. Randy Kramer -- I didn't have time to write a short letter, so I created a video instead.--with apologies to Cicero, et.al. --~--~-~--~~~---~--~~ 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: Working with after_create and Mailer Class
Nevermind, I figured it out. Definitely a "duh" moment. From within the class, using self points to the current instance. Thanks, Eric On Jan 31, 12:17 pm, ericindc wrote: > I am trying to setup sending confirmation emails after creating a new > instance of Project. In my Project Model, I have an after_create > callback that calls the method send_confirmation. This is working > fine -- the method is called, but I haven't figured out how to pass > along the current instance object to the Mailer class I've created. > > I had assumed that instance variables were accessible from within the > Project Model, even if created inside of the Project Controller. The > code below results in error "nil.name undefined". So how do I get the > mailer to know of the current instance object in order to send an > email using its attributes. > > Probably doing something stupid. Thanks in advance. > > Project Model: > > after_create :send_confirmation > > def send_confirmation > Mailer.deliver_confirm(@project) > end > > Mailer Class: > > def confirm(project) > ... > subject project.name > ... > end --~--~-~--~~~---~--~~ 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: Customizing Model Data -- Inside Model or View or Helper?
Thanks for the replies, fellas. I've moved the code into my Model. Thanks again. On Jan 31, 11:33 am, Rob Lacey wrote: > Agreed its easier to test models, or at least I find it easier. I'd say > that its a fortunate side effect though, rather than a reason to test in > a certain way. Although I guess if it really is too hard to test any > part of your app then you're probably trying to solve the problem in the > wrong way. I never test my views to be honest, it seems that its going > just a step too far and it tends to be fairly fragile at that. > > RobL > > > I prefer to say that like: Put the code where it's easiest to test. > > Models are easier to test than controllers, so put the most business > logic there. Views are hardest to test, so put lots of untestable art there! --~--~-~--~~~---~--~~ 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] Working with after_create and Mailer Class
I am trying to setup sending confirmation emails after creating a new instance of Project. In my Project Model, I have an after_create callback that calls the method send_confirmation. This is working fine -- the method is called, but I haven't figured out how to pass along the current instance object to the Mailer class I've created. I had assumed that instance variables were accessible from within the Project Model, even if created inside of the Project Controller. The code below results in error "nil.name undefined". So how do I get the mailer to know of the current instance object in order to send an email using its attributes. Probably doing something stupid. Thanks in advance. Project Model: after_create :send_confirmation def send_confirmation Mailer.deliver_confirm(@project) end Mailer Class: def confirm(project) ... subjectproject.name ... end --~--~-~--~~~---~--~~ 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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 9:01 AM, Chris Habgood wrote: > IP/app > IP/app1 OK, dump all the virtual host stuff you're not using and under the default host put something like: ProxyPass /app/ http://localhost:3000/ ProxyPassReverse /app/ http://localhost:3000/ ProxyPass /app1/ http://localhost:3001/ ProxyPassReverse /app1/ http://localhost:3001/ Done. -- Hassan Schroeder hassan.schroe...@gmail.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: Tag clouds
If you need any help with this, let me know. I am currently using acts_as_taggable_on here: http://jibber.bobmartens.net so I have a little bit of experience. On Jan 31, 5:29 am, Saravanan Krishnan wrote: > Hi Vivek, > > As Andrew's suggesstion try the acts_as_taggable_on plugin/gem and the > associtated tag_cloud helper > > Refer this links also > > http://wiki.rubyonrails.org/rails/pages/Acts+As+Taggable+Plugin > > http://noobonrails.blogspot.com/2005/11/using-actsastaggable-in-rails... > > Thanks > Saravanan > -- > 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 with apache virtual hosts, mongrel
IP/app IP/app1 Not sure how to do it using mongrel on apache. All I have seen it doing it with virtual hosts. proxy to mongrel and back. On Sat, Jan 31, 2009 at 10:56 AM, Hassan Schroeder < hassan.schroe...@gmail.com> wrote: > > On Sat, Jan 31, 2009 at 8:46 AM, Me wrote: > > > > huh, well I am doing it according to the apache docs. > > > I go to http://192.168.1.1/turindata > > I should be able to go to http://192.168.1.1/employeedb > > One more time -- the above has nothing to do with "virtual hosts". > Nothing. At. All. Let's try again. > > Check one, and only one: > > [ ] I want to access my apps as separate virtual hosts, as in: >http://employeedb/ >http://turindata/ > > [ ] I want to access my apps on one host, in this case '192.168.1.1', >using different paths: > http://192.168.1.1/turindata > http://192.168.1.1/employeedb > > Those are your choices. Either is easily implemented. > > Just make up your mind. > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 8:46 AM, Me wrote: > > huh, well I am doing it according to the apache docs. > I go to http://192.168.1.1/turindata > I should be able to go to http://192.168.1.1/employeedb One more time -- the above has nothing to do with "virtual hosts". Nothing. At. All. Let's try again. Check one, and only one: [ ] I want to access my apps as separate virtual hosts, as in: http://employeedb/ http://turindata/ [ ] I want to access my apps on one host, in this case '192.168.1.1', using different paths: http://192.168.1.1/turindata http://192.168.1.1/employeedb Those are your choices. Either is easily implemented. Just make up your mind. -- Hassan Schroeder hassan.schroe...@gmail.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: Can I force a form to submit empty fields?
It was funny because I was thinking checkbox is different when I wrote my reply but left it out anyways... You have to specify what the default is and that should get you 1 or 0 or yes or no... check_box("product", "published", {}, '1', '0') or check_box("puppy", "gooddog", {}, "yes", "no") Btw the check_box form helper will great a hidden field anyway... --~--~-~--~~~---~--~~ 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 with apache virtual hosts, mongrel
huh, well I am doing it according to the apache docs. the *:80 routes all traffic from port 80 and the ServerName differentiates between the different virtual hosts. I go to http://192.168.1.1/turindata I should be able to go to http://192.168.1.1/employeedb If this is not correct can you please instruct me how to make this happen somehow? I am not an apache guru just trying to go by the rails stuff I have found and apache docs. On Jan 31, 10:38 am, Hassan Schroeder wrote: > On Sat, Jan 31, 2009 at 8:22 AM, Me wrote: > > > Ok, well this is where it gets odd, like I said before I can go to: > > It's not "odd" at all. You're seeing the first app that matches as the > default. That is NOT an indication that it's "working", even partially. > > If you don't use the defined server names to access your app, the > current configuration *WILL NOT WORK*. > > I suggest you first make up your mind how you want to access your > server, as two virtual hosts, or 1 host with separate apps as you're > apparently attempting now. > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 8:22 AM, Me wrote: > > Ok, well this is where it gets odd, like I said before I can go to: It's not "odd" at all. You're seeing the first app that matches as the default. That is NOT an indication that it's "working", even partially. If you don't use the defined server names to access your app, the current configuration *WILL NOT WORK*. I suggest you first make up your mind how you want to access your server, as two virtual hosts, or 1 host with separate apps as you're apparently attempting now. -- Hassan Schroeder hassan.schroe...@gmail.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: Customizing Model Data -- Inside Model or View or Helper?
Agreed its easier to test models, or at least I find it easier. I'd say that its a fortunate side effect though, rather than a reason to test in a certain way. Although I guess if it really is too hard to test any part of your app then you're probably trying to solve the problem in the wrong way. I never test my views to be honest, it seems that its going just a step too far and it tends to be fairly fragile at that. RobL > I prefer to say that like: Put the code where it's easiest to test. > Models are easier to test than controllers, so put the most business logic there. Views are hardest to test, so put lots of untestable art there! --~--~-~--~~~---~--~~ 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 with apache virtual hosts, mongrel
Ok, well this is where it gets odd, like I said before I can go to: I have my local server set up for http requests from my router. I can go to: http://192.168.1.1/turindata no problem the other app bombs On Jan 31, 10:19 am, Hassan Schroeder wrote: > On Sat, Jan 31, 2009 at 8:11 AM, Me wrote: > > ServerName employeedb > > ServerName turindata > > Might work -- if you were accessing your server /using those names/ > e.g.http://employeedb/ andhttp://turindata/ > > So either do that, or dump all the virtual host stuff and fix your proxy > settings to respond to the format e.g.http://192.168.1.1/myapp1, if > that's what you want. > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 8:11 AM, Me wrote: > ServerName employeedb > ServerName turindata Might work -- if you were accessing your server /using those names/ e.g. http://employeedb/ and http://turindata/ So either do that, or dump all the virtual host stuff and fix your proxy settings to respond to the format e.g. http://192.168.1.1/myapp1, if that's what you want. -- Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
OK I was trying to avoid pasting the virtual hsots file but here it goes: NameVirtualHost *:80 ServerName employeedb DocumentRoot "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public" RewriteEngine On Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ProxyRequests Off ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ ProxyPreserveHost on ServerName turindata DocumentRoot "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/ Turindata/public" Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ProxyRequests Off ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ On Jan 31, 10:08 am, Hassan Schroeder wrote: > On Sat, Jan 31, 2009 at 8:01 AM, Me wrote: > > > The first virtual host. > > > My sever locally is ex. 192.168.1.1 > > > I go to 192.168.1.1/myapp1 > > > that app in my vitual host works > > > If I go to 192.168.1.1/myapp2 > > The above has exactly nothing to do with "virtual hosts", so I'm not > sure where your subject line comes from. If you're trying to "fix" the > above situation with virtual host directives, you're going to be badly > disappointed :-) > > You need appropriate proxy settings for your *one* host. > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 8:01 AM, Me wrote: > > The first virtual host. > > My sever locally is ex. 192.168.1.1 > > I go to 192.168.1.1/myapp1 > > that app in my vitual host works > > If I go to 192.168.1.1/myapp2 The above has exactly nothing to do with "virtual hosts", so I'm not sure where your subject line comes from. If you're trying to "fix" the above situation with virtual host directives, you're going to be badly disappointed :-) You need appropriate proxy settings for your *one* host. -- Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
The first virtual host. My sever locally is ex. 192.168.1.1 I go to 192.168.1.1/myapp1 that app in my vitual host works If I go to 192.168.1.1/myapp2 it says page cannot be displayed. It is the rails error page coming from myapp1. On Jan 31, 9:54 am, Hassan Schroeder wrote: > On Sat, Jan 31, 2009 at 7:50 AM, Me wrote: > > > OK, well like in the previous replies, the first one works no problem > > it is the ones after in the file that do not work. > > The "first one" /what/? Hostname? Is that the actual hostname of > your computer? A minute ago you said you were accessing your > server by IP address. Which is it? > > -- > Hassan Schroeder hassan.schroe...@gmail.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: Customizing Model Data -- Inside Model or View or Helper?
> Generally I would go with whatever solution feels more natural, and > easier to manage for you. Don't get bogged down in convention if it > doesn't work for you or feels wrong. I prefer to say that like: Put the code where it's easiest to test. Models are easier to test than controllers, so put the most business logic there. Views are hardest to test, so put lots of untestable art there! --~--~-~--~~~---~--~~ 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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 7:50 AM, Me wrote: > > OK, well like in the previous replies, the first one works no problem > it is the ones after in the file that do not work. The "first one" /what/? Hostname? Is that the actual hostname of your computer? A minute ago you said you were accessing your server by IP address. Which is it? -- Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
OK, well like in the previous replies, the first one works no problem it is the ones after in the file that do not work. On Jan 31, 9:49 am, Hassan Schroeder wrote: > On Sat, Jan 31, 2009 at 7:33 AM, Chris Habgood wrote: > > My server is local. IP address on my netowrk at home. I go to IP/?? for > > my rails apps > > If you want to use Named Virtual Hosts, then those names need to > be resolvable, though DNS, NIS, your local hosts file -- something. > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 7:33 AM, Chris Habgood wrote: > My server is local. IP address on my netowrk at home. I go to IP/?? for > my rails apps If you want to use Named Virtual Hosts, then those names need to be resolvable, though DNS, NIS, your local hosts file -- something. -- Hassan Schroeder hassan.schroe...@gmail.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
you missed the bug up your ass. --~--~-~--~~~---~--~~ 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 with apache virtual hosts, mongrel
My server is local. IP address on my netowrk at home. I go to IP/?? for my rails apps On Sat, Jan 31, 2009 at 9:30 AM, Hassan Schroeder < hassan.schroe...@gmail.com> wrote: > > On Sat, Jan 31, 2009 at 7:20 AM, Me wrote: > > > > Do you need to modify the hosts file if I go to my server address? Yes > > i have a different ServerName for each one. > > So are you accessing your server by IP address or host name? > If it's the former you have to use a different IP for each virtual host. > > Perhaps you should post the relevant parts of your conf files. > > -- > Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 7:20 AM, Me wrote: > > Do you need to modify the hosts file if I go to my server address? Yes > i have a different ServerName for each one. > > On Jan 31, 9:11 am, Conrad Taylor wrote: > > On Sat, Jan 31, 2009 at 6:58 AM, Chris Habgood > wrote: > > > windows, apache 2.2. I set the virtual hosts like the docs say but I > can > > > only get to one of them, the first one in the list of virtual hosts. > > > > > On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll wrote: > > > > >> Hi, > > > > >> This is not a rails problem but an issue for your webserver. > > >> I can only speak for unix systems but the path is usually the same: > > > > >> user sends a request to port 80, the webserver (e.g. apache) accepts > > >> it and > > >> decides wether to deliver a file or proxy the request to the mongrel. > > >> Usually there are more than one mongel and they run on port 3000 > > >> upwards. > > > > >> Let us know about you system details, what webserver you use. > > > > >> ciao, tom > > > > >> On Jan 31, 4:04 am, Me wrote: > > >> > Under windows, I am able to set up one virtual host that works with > > >> > mongrel no problem. The issue is when I set up additional ones I > > >> > cannot get to them. I look in the log file of the first app and it > is > > >> > trying to go there. > > >> > Does anyone know how to set up multiple virtual hosts with rails? > > > > >> -- > > >> Thomas R. "TomK32" Koll <>http://ananasblau.com > > >> just a geek trying to change the world > > >>http://github.com/TomK32 > > > > Hi, are you using a different ServerName for each virtual host? Also, > did > > you > > correctly configure the equivalent of Unix hosts' file under Windows? > > > > -Conrad > Hi, I'm not a Windows expert but I believe that you do have to modify the hosts' file to contain all the server names contained in your virtual hosts' file. -Conrad --~--~-~--~~~---~--~~ 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
Arthur Chan wrote: >> On the other hand, 4 days to resolve 25 simple bugs does not seem so >> tight. >> >> Cheers, Sazima > > Yup, i agree. But the bosses and clients never think so. Or actually, > they think so, but changed their mind when other things go wrong > together as the whole process are delayed. Ah, the joys of encountering reality! When a project starts, the process does not (apparently) matter! You can use code-and-fix, and whip out a great demo. Then, as the clients start asking for feature requests, each one starts taking a lttle longer! >> Do you pair program? Use test-driven development? > We don't use Test-driven development, but should be similar to Agile > Development. We decide each phase by putting the tasks or previous bugs > into bugzilla (ticket system), then start doing it. I think the problem > may be somehow created in the design phase since we only use bugzilla > but not e.g. UML. TDD _is_ the design process. It also reduces bugs. Never write the tests "just before integration" because you will miss stuff. Without TDD, you implement by debugging; by adding code, and noodling around with the running app to see if it works. That's a complete waste of time. TDD tells you if the logic is working, faster, so you can free up more test time. > For the automated tests, we just installed the ZenTest. Before that, we > write the test before integration. ZenTest is just a tool. > And not much Codes reviews too. That is what pair programming is for. With just two guys, that will be a pain, though! > We lack those UML, and Code Reviews all b'cuz the time. I think there > should be trade off for it. UML is not a process. Just throw in RailRoad (with Graphviz) and the UML is automatic... Now, is your code DRY? Is it all the same style? Are your models fat and controllers thin? Is any business logic in the view? Are your statements short? Does every name reveal intent? All these details will slow you down... > Our phase is susposed to be 3 days usually including the whole > development cycles. But usually we used 4-5 days even with many OTs. A "phase" is supposed to be a week. Stop doing overtime. But are your User Stories very small? Are they small increments on existing features, such as "take the form you wrote for the Frobs and now add a Delete button". When you do a User Story, are the programmers pulling for reducing the features? Do you do the minimum possible, get a review from your Onsite Customer, and then make him tell you to add more? _That_ is a review process - letting your boss watch things grow in realtime. > We integrate if we found that changes spread over web pages and before > testing. Do you think our integrate process got problems? By "integrate" do you mean "run all the tests and check in to Subversion if they all pass"? We do that every 1 to 10 minutes. -- Phlip http://flea.sourceforge.net/PiglegToo_1.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: rails with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 7:20 AM, Me wrote: > > Do you need to modify the hosts file if I go to my server address? Yes > i have a different ServerName for each one. So are you accessing your server by IP address or host name? If it's the former you have to use a different IP for each virtual host. Perhaps you should post the relevant parts of your conf files. -- Hassan Schroeder hassan.schroe...@gmail.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 with apache virtual hosts, mongrel
Do you need to modify the hosts file if I go to my server address? Yes i have a different ServerName for each one. On Jan 31, 9:11 am, Conrad Taylor wrote: > On Sat, Jan 31, 2009 at 6:58 AM, Chris Habgood wrote: > > windows, apache 2.2. I set the virtual hosts like the docs say but I can > > only get to one of them, the first one in the list of virtual hosts. > > > On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll wrote: > > >> Hi, > > >> This is not a rails problem but an issue for your webserver. > >> I can only speak for unix systems but the path is usually the same: > > >> user sends a request to port 80, the webserver (e.g. apache) accepts > >> it and > >> decides wether to deliver a file or proxy the request to the mongrel. > >> Usually there are more than one mongel and they run on port 3000 > >> upwards. > > >> Let us know about you system details, what webserver you use. > > >> ciao, tom > > >> On Jan 31, 4:04 am, Me wrote: > >> > Under windows, I am able to set up one virtual host that works with > >> > mongrel no problem. The issue is when I set up additional ones I > >> > cannot get to them. I look in the log file of the first app and it is > >> > trying to go there. > >> > Does anyone know how to set up multiple virtual hosts with rails? > > >> -- > >> Thomas R. "TomK32" Koll <>http://ananasblau.com > >> just a geek trying to change the world > >>http://github.com/TomK32 > > Hi, are you using a different ServerName for each virtual host? Also, did > you > correctly configure the equivalent of Unix hosts' file under Windows? > > -Conrad --~--~-~--~~~---~--~~ 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: Customizing Model Data -- Inside Model or View or Helper?
Hi there, Ok that statement was probably a bit ambiguous. I'd use a view helper to encapsulate something that is purely view based. I'd say that commified_name isn't confined to the view, its legitimately an attribute of the model - model attributes aren't confined to database attributes. I don't think that would break convention at all. The convention is there to make things easier to manage, separating that logic into a view helper would make it, in my eyes less easy to manage. Generally I would go with whatever solution feels more natural, and easier to manage for you. Don't get bogged down in convention if it doesn't work for you or feels wrong. RobL http://www.robl.me ericindc wrote: > Thanks for the reply. > > "I'd only really use a helper method to encapsulate repeated code in > views." > > But isn't that the case here? I repeatedly use the commified version > of the name inside of my views. So why wouldn't C be the best > solution? Wouldn't using A break that convention? > > I also use the commified version of the name inside of a > collection_select statement, so that the displayed names in the > dropdown menu are "last_name, first_name". The only way I've found to > do that is to have a method inside of my Project model that returns > the commified name, even though the collection_select is inside of my > Project View. > > So I guess given that, C is the best solution to avoid repetition > (commified_name in Model and Helper)? > > Thanks > > On Jan 31, 7:07 am, Rob Lacey wrote: > >> I would always go for A >> >> def commified_name >> "#{self.firstname} #{self.last_name}" >> end >> >> It keeps the formatting in one place, no need for an additional helper >> method or indeed a helper class. I'd only really use a helper method to >> encapsulate repeated code in views. Just suppose you wanted to see the >> commified name in the console or use it to perform some kind of >> validation, etc. >> >> RobL >> >> ericindc wrote: >> >>> Say I have to Models,ProjectandCreator, related to each other such >>> that @project.creatoris valid. Creatorhas two fields, first_name >>> and last_name, for thecreator'sname. Assuming that I want a quick >>> way to display thecreator'sname as "last_name, first_name" inside >>> the view, which is the best approach (efficiency, the Rails way, etc.) >>> and why? >>> >>> Here are the approached I've come up with... >>> >>> A) Create a method in theCreatorclass called commified_name and use >>> @project.creator.commified_name in the view. This seems like a good >>> option. It's DRY and fits the rest of the mold for @project.xyz in >>> the view, but I think following MVC the model is not meant for >>> formatting, right? >>> >>> def commified_name >>> [self.last_name, self.first_name].join(', ') >>> end >>> >>> B) Do the join inside the view. Probably the worst of the options >>> since it allows for variations in how the name is displayed. >>> >>> C) Create a method in theCreatorHelper called commified_name and use >>> commified_name in the view. I believe this is the best answer since >>> formatting of information that goes in the View belongs in a Helper, >>> right? I just find that A feels more right to me. >>> >>> def commified_name >>> [...@project.creator.last_name, @project.creator.first_name].join(', >>> ') if @project >>> end >>> >>> If C (or A) is the best answer, is this a good way to accomplish what >>> I'm after. Thanks 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: rails with apache virtual hosts, mongrel
On Sat, Jan 31, 2009 at 6:58 AM, Chris Habgood wrote: > windows, apache 2.2. I set the virtual hosts like the docs say but I can > only get to one of them, the first one in the list of virtual hosts. > > > On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll wrote: > >> >> Hi, >> >> This is not a rails problem but an issue for your webserver. >> I can only speak for unix systems but the path is usually the same: >> >> user sends a request to port 80, the webserver (e.g. apache) accepts >> it and >> decides wether to deliver a file or proxy the request to the mongrel. >> Usually there are more than one mongel and they run on port 3000 >> upwards. >> >> Let us know about you system details, what webserver you use. >> >> ciao, tom >> >> On Jan 31, 4:04 am, Me wrote: >> > Under windows, I am able to set up one virtual host that works with >> > mongrel no problem. The issue is when I set up additional ones I >> > cannot get to them. I look in the log file of the first app and it is >> > trying to go there. >> > Does anyone know how to set up multiple virtual hosts with rails? >> >> >> -- >> Thomas R. "TomK32" Koll <> http://ananasblau.com >> just a geek trying to change the world >> http://github.com/TomK32 >> >> > Hi, are you using a different ServerName for each virtual host? Also, did you correctly configure the equivalent of Unix hosts' file under Windows? -Conrad --~--~-~--~~~---~--~~ 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 with apache virtual hosts, mongrel
windows, apache 2.2. I set the virtual hosts like the docs say but I can only get to one of them, the first one in the list of virtual hosts. On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll wrote: > > Hi, > > This is not a rails problem but an issue for your webserver. > I can only speak for unix systems but the path is usually the same: > > user sends a request to port 80, the webserver (e.g. apache) accepts > it and > decides wether to deliver a file or proxy the request to the mongrel. > Usually there are more than one mongel and they run on port 3000 > upwards. > > Let us know about you system details, what webserver you use. > > ciao, tom > > On Jan 31, 4:04 am, Me wrote: > > Under windows, I am able to set up one virtual host that works with > > mongrel no problem. The issue is when I set up additional ones I > > cannot get to them. I look in the log file of the first app and it is > > trying to go there. > > Does anyone know how to set up multiple virtual hosts with rails? > > > -- > Thomas R. "TomK32" Koll <> http://ananasblau.com > just a geek trying to change the world > http://github.com/TomK32 > > > --~--~-~--~~~---~--~~ 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: Customizing Model Data -- Inside Model or View or Helper?
Oops, I meant A (in the Model) is the best answer, not C. On Jan 31, 9:42 am, ericindc wrote: > Thanks for the reply. > > "I'd only really use a helper method to encapsulate repeated code in > views." > > But isn't that the case here? I repeatedly use the commified version > of the name inside of my views. So why wouldn't C be the best > solution? Wouldn't using A break that convention? > > I also use the commified version of the name inside of a > collection_select statement, so that the displayed names in the > dropdown menu are "last_name, first_name". The only way I've found to > do that is to have a method inside of my Project model that returns > the commified name, even though the collection_select is inside of my > Project View. > > So I guess given that, C is the best solution to avoid repetition > (commified_name in Model and Helper)? > > Thanks > > On Jan 31, 7:07 am, Rob Lacey wrote: > > > I would always go for A > > > def commified_name > > "#{self.firstname} #{self.last_name}" > > end > > > It keeps the formatting in one place, no need for an additional helper > > method or indeed a helper class. I'd only really use a helper method to > > encapsulate repeated code in views. Just suppose you wanted to see the > > commified name in the console or use it to perform some kind of > > validation, etc. > > > RobL > > > ericindc wrote: > > > Say I have to Models,ProjectandCreator, related to each other such > > > that @project.creatoris valid. Creatorhas two fields, first_name > > > and last_name, for thecreator'sname. Assuming that I want a quick > > > way to display thecreator'sname as "last_name, first_name" inside > > > the view, which is the best approach (efficiency, the Rails way, etc.) > > > and why? > > > > Here are the approached I've come up with... > > > > A) Create a method in theCreatorclass called commified_name and use > > > @project.creator.commified_name in the view. This seems like a good > > > option. It's DRY and fits the rest of the mold for @project.xyz in > > > the view, but I think following MVC the model is not meant for > > > formatting, right? > > > > def commified_name > > > [self.last_name, self.first_name].join(', ') > > > end > > > > B) Do the join inside the view. Probably the worst of the options > > > since it allows for variations in how the name is displayed. > > > > C) Create a method in theCreatorHelper called commified_name and use > > > commified_name in the view. I believe this is the best answer since > > > formatting of information that goes in the View belongs in a Helper, > > > right? I just find that A feels more right to me. > > > > def commified_name > > > [...@project.creator.last_name, @project.creator.first_name].join(', > > > ') if @project > > > end > > > > If C (or A) is the best answer, is this a good way to accomplish what > > > I'm after. Thanks 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Customizing Model Data -- Inside Model or View or Helper?
Thanks for the reply. "I'd only really use a helper method to encapsulate repeated code in views." But isn't that the case here? I repeatedly use the commified version of the name inside of my views. So why wouldn't C be the best solution? Wouldn't using A break that convention? I also use the commified version of the name inside of a collection_select statement, so that the displayed names in the dropdown menu are "last_name, first_name". The only way I've found to do that is to have a method inside of my Project model that returns the commified name, even though the collection_select is inside of my Project View. So I guess given that, C is the best solution to avoid repetition (commified_name in Model and Helper)? Thanks On Jan 31, 7:07 am, Rob Lacey wrote: > I would always go for A > > def commified_name > "#{self.firstname} #{self.last_name}" > end > > It keeps the formatting in one place, no need for an additional helper > method or indeed a helper class. I'd only really use a helper method to > encapsulate repeated code in views. Just suppose you wanted to see the > commified name in the console or use it to perform some kind of > validation, etc. > > RobL > > ericindc wrote: > > Say I have to Models,ProjectandCreator, related to each other such > > that @project.creatoris valid. Creatorhas two fields, first_name > > and last_name, for thecreator'sname. Assuming that I want a quick > > way to display thecreator'sname as "last_name, first_name" inside > > the view, which is the best approach (efficiency, the Rails way, etc.) > > and why? > > > Here are the approached I've come up with... > > > A) Create a method in theCreatorclass called commified_name and use > > @project.creator.commified_name in the view. This seems like a good > > option. It's DRY and fits the rest of the mold for @project.xyz in > > the view, but I think following MVC the model is not meant for > > formatting, right? > > > def commified_name > > [self.last_name, self.first_name].join(', ') > > end > > > B) Do the join inside the view. Probably the worst of the options > > since it allows for variations in how the name is displayed. > > > C) Create a method in theCreatorHelper called commified_name and use > > commified_name in the view. I believe this is the best answer since > > formatting of information that goes in the View belongs in a Helper, > > right? I just find that A feels more right to me. > > > def commified_name > > [...@project.creator.last_name, @project.creator.first_name].join(', > > ') if @project > > end > > > If C (or A) is the best answer, is this a good way to accomplish what > > I'm after. Thanks 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Maxima and Ruby Integration
Well since it probably supports command line arguments, you could always use 'system' method On Jan 31, 5:22 am, Richard Schneeman wrote: > I'm looking to write a javascript heavy clientside program with a > something serverside backend that connects to the free maxima math > program. I have extensive knowledge of ruby on rails, so I would prefer > to call Maxima with ruby, but I don't know if this is even possible. Its > fairly easy to call Maxima (with a lisp implementation) using ANSI C, it > is a little less easy to implement using JAVA with a lisp implementation > like Armed Bear, but I don't see any information about using Maxima with > Ruby or Ruby on Rails. > > Since Maxima as far as I can tell is the number one most powerful > open-source math program, and RoR is my favorite open-source web > framework, it would seem like a good fit. Has anyone implemented any > math heavy applications with RoR, and can you give me any advice (anyone > know if RoR and maxima is possible) ?? > -- > 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: Fetching RSS feeds asynchronously in background
Hi Lennart, You may have interests on this: http://github.com/janx/newsmailer/blob/a4329bab234d8cc0252d9d7a72e97036b8a278df/app/models/crawler.rb Best, Jan * Lennart Koopmann [2009-01-30 13:09:19 +0100]: > > Hello everyone, > > I want to fetch some (5-10) RSS feeds from another server. I plan to > fetch the RSS feeds asynchronously and store them on the hard disk > every 30 minutes so I can read them from there on every request. (To > treat the remote server with care and to avoid longer page generation > time). > > What is the best way to do that? > > I think about starting a fetcher-thread on the start of my Rails > application. I want to avoid cron jobs to keep everything in the Rails > application. > > Thank you! > > So long > Lennart Koopmann > > --~--~-~--~~~---~--~~ > 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 > -~--~~~~--~~--~--~--- -- jan=callcc{|jan|jan};jan.call(jan) pgpFlxHyiIJ00.pgp Description: PGP signature
[Rails] Re: Is It Possible to use auto complete with text_field _tag.
Hi, You can use auto_complete plugin and use text_field_with_auto_complete tag rather than text_field_tag NAYAK On Sat, Jan 31, 2009 at 11:19 AM, Newb Newb < rails-mailing-l...@andreas-s.net> wrote: > > hi > Is it possible to use auto complete with text_field _tag. > Kindly let me know > > Cheers > -- > Posted via http://www.ruby-forum.com/. > > > > -- - NAYAK --~--~-~--~~~---~--~~ 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: Dirty.rb - confused
> I am working with Active Record 2.1.x and there is a file called > dirty.rb. Now I might be missing something but within the function > write_attribute_with_dirty there is a call to > write_attribute_without_dirty. Where is the definition for this > function? What happens after this call? > that's a common idiom in Rails. They are using an alias to the original "write_attribute" so they can intercept the calls to write_attribute, do whatever is needed for the "dirty" functionality and then call to the original "write_attribute" (without_dirty). you can do this by using several alias statements or you can use the alias_method_chain method provided by the Rails API. by using the strategy of naming/aliasing the methods using the with/without suffix, you can be (almost) sure that even if you are aliasing a method that was already aliased, everything will be peachy. AFAIK in Rails 3 this could change, since the Merb guys are not happy (and with a reason) about so many levels of indirection and the complexity introduced in the code. But as of now, it's a common pattern all throughout Rails code and plugins. regards, -- javier ramírez ..i do ruby on rails development in madrid, spain, at http://www.aspgems.com ..you can find out more about me on http://formatinternet.wordpress.com and http://workingwithrails.com/person/5987-javier-ramirez --~--~-~--~~~---~--~~ 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
Sazima wrote: > 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 Yup, i agree. But the bosses and clients never think so. Or actually, they think so, but changed their mind when other things go wrong together as the whole process are delayed. cheers, Arthur -- Posted via http://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
Hi Phlip, Phlip wrote: > Arthur Chan wrote: >> Hi guys, >> >> I don't know if this question is proper to post here. But I think it is >> related to every developer, so I post. >> >> I am using RoR for developments more than a year. We are using Bugzilla. >> We do unit, funcitonal and watir tests. > > Do you pair program? Use test-driven development? And do you make the > fewest > possible edits between successful test runs? Do you test incrementally, > where > only suites edited in the last 10 minutes run to integrate? > We don't use Test-driven development, but should be similar to Agile Development. We decide each phase by putting the tasks or previous bugs into bugzilla (ticket system), then start doing it. I think the problem may be somehow created in the design phase since we only use bugzilla but not e.g. UML. For the automated tests, we just installed the ZenTest. Before that, we write the test before integration. And not much Codes reviews too. We lack those UML, and Code Reviews all b'cuz the time. I think there should be trade off for it. >> We usually schedule to do around 40-50 bugs for each development cycle >> and it scheduled to take 3-4 days. > > By "bug" do you mean missing feature? glitch? or irritating surprise? Both. For our boss, some usability problem or layout problems are surprise. And we focus on the functional stuff usually in our tests. That's the biggest surprises come from. > > Honestly we have the last one about once a month. We could do better. > But the > good news about our missing features is we _know_ they are missing; they > are not > surprises... We sometimes know it, but our boss doesn't think so. E.g. we modified jQuery Validation (real time validation plugns) display, it works fine in most case. But suddenly, in some ajax forms, the position distorted in IEs. That considered a critical one. So, how do you guys think about these kinda bug? Are we treating not serious enough to these problems? >> However, most of the time we cannot meet schedule and bugs are often >> found (around 10-25% need to reopen). > > Are your user stories very small, such as 1 hour to 3 days duration? > > Do you integrate continously and deploy daily? Do you work overtime? > Our phase is susposed to be 3 days usually including the whole development cycles. But usually we used 4-5 days even with many OTs. We integrate if we found that changes spread over web pages and before testing. Do you think our integrate process got problems? Thanks guys! arthur -- Posted via http://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 2.2.2 and mysql issue on ubuntu
On Sat, Jan 31, 2009 at 4:38 AM, Shuaib85 wrote: > It has been a while i did not use rails. I have upgraded to rails > 2.2.2 and I tried to run my application, i got this error > > !!! The bundled mysql.rb driver has been removed from Rails 2.2. > Please install the mysql gem and try again: gem install mysql. > > I have mysql, and I used to run rails applications normally on 2.1.0, > I googled the error and I installed some libraries based on some > forums. However, the problem exists. Any idea please??? What's ambiguous about `gem install mysql` ? -- Hassan Schroeder hassan.schroe...@gmail.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] rails 2.2.2 and mysql issue on ubuntu
Hi there, It has been a while i did not use rails. I have upgraded to rails 2.2.2 and I tried to run my application, i got this error !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. I have mysql, and I used to run rails applications normally on 2.1.0, I googled the error and I installed some libraries based on some forums. However, the problem exists. Any idea please??? --~--~-~--~~~---~--~~ 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: Hash names with white spaces
Ok Tom, like you suggested, both params['first name'] and params[:'first name'] worked for me. Case solved. Thanks again Stefano -- Posted via http://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: Customizing Model Data -- Inside Model or View or Helper?
I would always go for A def commified_name "#{self.firstname} #{self.last_name}" end It keeps the formatting in one place, no need for an additional helper method or indeed a helper class. I'd only really use a helper method to encapsulate repeated code in views. Just suppose you wanted to see the commified name in the console or use it to perform some kind of validation, etc. RobL ericindc wrote: > Say I have to Models, Project and Creator, related to each other such > that @project.creator is valid. Creator has two fields, first_name > and last_name, for the creator's name. Assuming that I want a quick > way to display the creator's name as "last_name, first_name" inside > the view, which is the best approach (efficiency, the Rails way, etc.) > and why? > > Here are the approached I've come up with... > > A) Create a method in the Creator class called commified_name and use > @project.creator.commified_name in the view. This seems like a good > option. It's DRY and fits the rest of the mold for @project.xyz in > the view, but I think following MVC the model is not meant for > formatting, right? > > def commified_name > [self.last_name, self.first_name].join(', ') > end > > B) Do the join inside the view. Probably the worst of the options > since it allows for variations in how the name is displayed. > > C) Create a method in the Creator Helper called commified_name and use > commified_name in the view. I believe this is the best answer since > formatting of information that goes in the View belongs in a Helper, > right? I just find that A feels more right to me. > > def commified_name > [...@project.creator.last_name, @project.creator.first_name].join(', > ') if @project > end > > If C (or A) is the best answer, is this a good way to accomplish what > I'm after. Thanks 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails an MDA?
Hi, I'm currently thinking of writing my bachelorthesis about the use of model driven architecture within webdevelopment. I'm now trying to figure out about the benefits of using MDA to generate Rails Code. So, which Components of an Web-/Rails App would you like to be generated via MDA? In which way do you think the generators shipped with Rails can be improved? -- Posted via http://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: Suggestions for a rails webhost...
+1 for slicehost On Fri, Jan 30, 2009 at 11:31 AM, Denis Haskin wrote: > We host on EC2. I think it beats anything else for dev+test environments > (since you can create and tear down instances very easily and pretty > quickly, thanks to the various projects out there that let you do this --see > [1]). > > For production, my impression is that it's more expensive than some other > options, but that's not based on any empirical evidence. If you need to be > able to scale up and down quickly, then it can't be beat (right now you have > to roll your own auto-scaling, but Amazon has announced intentions to > provide this as a service [2]) . But if your configuration is going to be > largely static, I suspect you'll do better pricewise with another vendor. > > dwh > > [1] We use http://github.com/pauldowman/ec2onrails > [2] http://aws.amazon.com/contact-us/new-features-for-amazon-ec2/ > > > Richard Aday wrote: > > What do people think about hosting it on EC2 (Amazon Cloud)? I havn't > tried it, but am looking for responses. > > > > > -- God Bless, Joe Ocampo agilejoe.lostechies.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] has_many with different foreign key
Hello, I am new to rails and am trying to get my associations straight. I have a User model and a Property model. I'd like to track who has updated a property record, so I added an integer field to the properties table called updated_by. Then I made the following changes: In the User model: has_many :properties In the Property model: belongs_to :user, :class_name => "User", :foreign_key => 'updated_by' Here's what I see inside of the rails console: >> prop = Property.first => # >> usr = User.first => # >> prop.user = usr => # >> prop.updated_by => 1 >> prop.updated_by.name NoMethodError: undefined method `name' for 1:Fixnum from (irb):5 >> I'm not sure what I've done, but I think it's something simple. Any help would be massively appreciated. 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: Installing plugins... is git necessary?
Fernando's instructions worked for me. Seems a bit tedious though - working cli install would surely better? I tried following Sazima's instructions. Couldn't find the plug-in even with the git sources. On Jan 22, 11:12 pm, Harry Seldon wrote: > I wrote recently an article about Rails, Git and plugin management. It > might be of interest to > you:http://harryseldon.thinkosphere.com/2009/01/14/git-and-rails-a-detail... > H > > Sonny Chee wrote: > > Thanks Sazima, > > > I added github as a source but I'm still getting the > > >> Plugin not found: ["acts_as_tree"] > > > Sonny. > > > Sazima wrote: > >> gem sources -ahttp://gems.github.com > > >> Cheers, Sazima > > >> On Jan 21, 9:55 pm, Sonny Chee > > -- > 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: Suggestions for a rails webhost...
yap, slicehost +1 =) but it depends how much you want to spent, with slice host you have complete control of you server, but of course a VPS is more expensive than a simple host service. On Jan 29, 5:02 pm, Michael Kahle wrote: > I have multiple domains I want to move to a rails host. I would like > full SSH access to the servers, ftp, and a knowledgeable support staff > that I can get on the phone. > > Any suggestions? > -- > 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] has_many with different foreign key
Hello, I am new to rails and am trying to get my associations straight. I have a User model and a Property model. I'd like to track who has updated a property record, so I added an integer field to the properties table called updated_by. Then I made the following changes: In the User model: has_many :properties In the Property model: belongs_to :user, :class_name => "User", :foreign_key => 'updated_by' Here's what I see inside of the rails console: >> prop = Property.first => # >> usr = User.first => # >> prop.user = usr => # >> prop.updated_by => 1 >> prop.updated_by.name NoMethodError: undefined method `name' for 1:Fixnum from (irb):5 >> I'm not sure what I've done, but I think it's something simple. Any help would be massively appreciated. 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] Customizing Model Data -- Inside Model or View or Helper?
Say I have to Models, Project and Creator, related to each other such that @project.creator is valid. Creator has two fields, first_name and last_name, for the creator's name. Assuming that I want a quick way to display the creator's name as "last_name, first_name" inside the view, which is the best approach (efficiency, the Rails way, etc.) and why? Here are the approached I've come up with... A) Create a method in the Creator class called commified_name and use @project.creator.commified_name in the view. This seems like a good option. It's DRY and fits the rest of the mold for @project.xyz in the view, but I think following MVC the model is not meant for formatting, right? def commified_name [self.last_name, self.first_name].join(', ') end B) Do the join inside the view. Probably the worst of the options since it allows for variations in how the name is displayed. C) Create a method in the Creator Helper called commified_name and use commified_name in the view. I believe this is the best answer since formatting of information that goes in the View belongs in a Helper, right? I just find that A feels more right to me. def commified_name [...@project.creator.last_name, @project.creator.first_name].join(', ') if @project end If C (or A) is the best answer, is this a good way to accomplish what I'm after. Thanks 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Where is #put functional test method documented?
Even though you figured out what was wrong in the middle of posting, thanks for posting it anyways. Google search indexed this post, and was one of the first results helping me solve this exact issue. -Brad On Dec 31 2008, 5:02 pm, "Patrick Doyle" wrote: > > users(:quentin) is instantiating the user based on your users.yml fixture. > > Instead, you'll want to query the database for the user. > > Yeah, that dawned on me as I wrote my email. But at that point I still > wanted to find a better way to search the documentation. RailsBrain looks > like a great find. Thank you for the tip. > > --wpd --~--~-~--~~~---~--~~ 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] active_scaffold config issue? Complains about rails 2.2.2 dependency.
Howdy all, Trying to start WEBrick. The error is displayed "This version of ActiveScaffold requires Rails 2.2 or higher. Please use an earlier version. (RuntimeError)" "gem list" shows "rails 2.2.2", so looks like the proper version is present. What am I missing? Is this a config issue? Or is this a coding error? Any ideas? Many thanks! (BTW, errantly posted this in the comp.lang.ruby a few min ago. Apologies.) $ ruby script/server => Booting WEBrick... /home/drub/src/ruby/soccer/vendor/plugins/active_scaffold/init.rb:5:in `evaluate_init_rb': This version of ActiveScaffold requires Rails 2.2 or higher. Please use an earlier version. (RuntimeError) from ./script/../config/../vendor/rails/railties/lib/rails/plugin.rb: 79:in `evaluate_init_rb' from /home/drub/src/ruby/soccer/vendor/rails/activesupport/lib/ active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from ./script/../config/../vendor/rails/railties/lib/rails/plugin.rb: 75:in `evaluate_init_rb' from ./script/../config/../vendor/rails/railties/lib/rails/plugin.rb: 39:in `load' from ./script/../config/../vendor/rails/railties/lib/rails/plugin/ loader.rb:33:in `load_plugins' from ./script/../config/../vendor/rails/railties/lib/rails/plugin/ loader.rb:32:in `each' from ./script/../config/../vendor/rails/railties/lib/rails/plugin/ loader.rb:32:in `load_plugins' from ./script/../config/../vendor/rails/railties/lib/initializer.rb: 189:in `load_plugins' ... 14 levels... from /home/drub/src/ruby/soccer/vendor/rails/activesupport/lib/ active_support/dependencies.rb:496:in `require' from /home/drub/src/ruby/soccer/vendor/rails/railties/lib/commands/ server.rb:39 from script/server:3:in `require' from script/server:3 $ $ gem list *** LOCAL GEMS *** actionmailer (2.2.2) Service layer for easy email delivery and testing. actionpack (2.2.2) Web-flow and rendering framework putting the VC in MVC. activerecord (2.2.2) Implements the ActiveRecord pattern for ORM. activeresource (2.2.2) Think Active Record for web resources. activesupport (2.2.2) Support and utility classes used by the Rails framework. assignment (0.0.1) Library for completing assignments rails (2.2.2) Web-application framework with template engine, control-flow layer, and ORM. rake (0.8.3) Ruby based make-like utility. sources (0.0.1) This package provides download sources for remote gem installation --~--~-~--~~~---~--~~ 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] Save a cookie with unescaped content
Hi, i'm trying to save a cookie with some especial characters like this 'diasnd190823===??//< 'diasnd190823===??//< 'mycookie', 'value' => 'diasnd190823===??//
[Rails] Re: rename sessions table in rails
Mate, well, can we add anothers attributes in the sessions table and make updates as the application requests ? 2009/1/30 Valentino Lun > > Dear all > > Problem solve by including the following entries to > config/environments/*.rb > > CGI::Session::ActiveRecordStore::Session.set_table_name "xxx_sessions" > > Thank you. > -- > Posted via http://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] Botprotection plugin?
Hello, do anyone know a rails plugin which protects against spambots? If a the same page would be opened several times in a short time a captcha request popup to verify that there is no bot surfing at the rails application? Regards Adam --~--~-~--~~~---~--~~ 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] Problem with ssl_requirement
Hello, I am trying to enable SSL for my rails app. I have installed the ssl_requirements plugin and added "include SslRequirement" in the application controller. Then I restart the server and access the home page. Then I am getting this error: NameError in ProjectsController#index uninitialized constant SslRequirement::UserSystem I have searched for this error, no luck. I notice that the plugin is correctly installed in the vendors directory. As soon as I remove the line “include SslRequirement”, my site works again. What am I doing wrong?? Thanks again! --~--~-~--~~~---~--~~ 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] Active Resource without Formatters
I have installed the ExtensionlessFormat plugin but I am still not able to get the information I need from the resource. The resource has a RESTful API that looks like this: GET {host} /processdefinitions A list of process definitions are returned As you can see they are expecting me not to supply the format in the URI hence why I installed ExtensionlessFormat plugin. When I instantiate the resource and perform a .find(:all) method I get the following error: >> pd = ProcessDefinitions.find(:all) NoMethodError: undefined method `collect!' for # from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:597:in `instantiate_collection' from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:574:in `find_every' from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:517:in `find' from (irb):2 If anyone has any advice concerning this matter, thanks for the help in advance. -- Thank you, Joe Ocampo agilejoe.lostechies.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] Cannot get webrick to start on Mac OS 10.5.6
Hi. I'm am new to Ruby on Rails and I'm trying to get my environment up and running. I know that Ruby and Rails are pre installed on Mac OS 10.5 but I was having some problems. I went and updated everything with gem update --system, gem update, etc. However: [Macintosh:rails/work/demo] jslicari% ruby script/server Rails requires RubyGems >= . Please install RubyGems and try again: http://rubygems.rubyforge.org Doesn't even tell me what version it needs. But: [Macintosh:rails/work/demo] jslicari% gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal- darwin9.0] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/ Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-9 - GEM PATHS: - /Library/Ruby/Gems/1.8 - /Users/jslicari/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ So RubyGems seems to be here with the latest and greatest version. Something seems to be very out of sync here but I can't figure out what. I also tried downloaded rubygems 1.3.1 and installing it again but that crashes: [Macintosh:~/desktop/rubygems-1.3.1] jslicari% ruby setup.rb ./lib/rubygems.rb:723:in `set_paths': uninitialized constant Gem::Etc (NameError) from ./lib/rubygems.rb:719:in `each' from ./lib/rubygems.rb:719:in `set_paths' from ./lib/rubygems.rb:526:in `path' from ./lib/rubygems/source_index.rb:66:in `installed_spec_directories' from ./lib/rubygems/source_index.rb:56:in `from_installed_gems' from ./lib/rubygems.rb:736:in `source_index' from ./lib/rubygems/gem_path_searcher.rb:86:in `init_gemspecs' from ./lib/rubygems/gem_path_searcher.rb:21:in `initialize' from ./lib/rubygems.rb:684:in `new' from ./lib/rubygems.rb:684:in `searcher' from ./lib/rubygems.rb:683:in `synchronize' from ./lib/rubygems.rb:683:in `searcher' from ./lib/rubygems/custom_require.rb:34:in `require' from /sw/lib/ruby/1.8/tmpdir.rb:12 from ./lib/rubygems/custom_require.rb:31:in `gem_original_require' from ./lib/rubygems/custom_require.rb:31:in `require' from setup.rb:95 I'm out of ideas. 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] Openings for Ruby Developer at CA
Hello , This is Aniket from Techclique, a New Jersey based software development and IT consulting firm providing top quality technical and software professionals on a permanent and contractual basis to Government and commercial customer including fortune 500 companies and most of states and federal governments. I am contacting you to see if you are comfortable to the skills mentioned below, please forward resume to this e-mail address ani...@techclique.com New PHP/RUBY Developer position in San Francisco.. Our EXCLUSIVE client! Job Description: - 2+ years experience with Ruby on Rails - 4+ years experience of PHP applications development (or other leading web development languages) - Experience with OOP and inheritance - MVC Framework - 4+ years with HTML and CSS - 3+ years JavaScript - AJAX experience using frameworks (Prototype/Scriptaculous or jQuery) - 4+ years experience with Relational Databases (MySQL) - Write queries from scratch - Complex table joins - ERD Modeling - Intermediate knowledge of UNIX - BS/BA in Computer Science or equivalent experience Responsibilities: - Write Ruby, PHP, SQL, JavaScript code - Work with a creative team - Efficiently translate business requirements into functioning software - Present ideas to team members - We are a team, so everybody has to update and maintain legacy code - Comfortable working with a Mac Personal: - Passion for learning new skills - Strong problem solver - Strong communication skills - "Can do anything" attitude - Must pass background check Thanks & Regards, Aniket Techclique Inc. Jersey City, NJ Email: ani...@techclique.com Yahoo IM : aniket_mitta...@yahoo.com Contact No : 732-357-3844 --~--~-~--~~~---~--~~ 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] File descriptor leak in Mongrel server?
Excuse my ignorance for I'm a RoR newby. We have a number of RoR applications running on a server with a cPanel installation. One of the clients sites went belly up with the error message: Errno::EMFILE Too many open files - socket(2) Digging a bit I found that the mongrel server had a large number of sockets open and appears to be leaking them fairly frequently. The lsof looks like this mongrel_r 11184 username 193u unix 0xda4fa480 637209350 socket mongrel_r 11184 username 194u unix 0xf685a680 637408911 socket mongrel_r 11184 username 195u unix 0xcc2ea3c0 637684747 socket The application doesn't do anything explicitly with sockets. As far as I know the RoR installation is standard - from what I understand the hosting company support installed it and RoR is only semi-supported by cPanel so they're somewhat reluctant/lack the knowledge to be of much assistance? I did google searches of every combination of ruby/rails/socket/leak/ cPanel/file descriptor/etc that I could think of and didn't find anything. I'm not exactly sure of what versions of ruby/rails/mongrel we have installed but didn't find anything about this being a known issue that had been fixed. I'd warrant a guess that we're not running the bleeding edge at any rate and are likely a few versions behind but again I'm not entirely sure how ruby is installed/managed under cPanel/ WHM. Any ideas on where to look further or what the issue could 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] Time picker working in both rails and ajax
Hi all, Am new to ruby on rails .I have some time pickers working alone in rails and when am using ajax it's not working . Could any one please give me a good solution for this problem . Regards William S --~--~-~--~~~---~--~~ 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] possible to set gems path?
I've installed ruby and rubygems on leopard. when i install a gem successfully and run require "gemname" in irb it fails: irb(main):001:0> require "P4" LoadError: no such file to load -- P4 from (irb):1:in `require' from (irb):1 irb(main):002:0> Yet here it is installed: >gem which P4 (checking gem p4ruby-1.0.7 for P4) /usr/local/lib/ruby/gems/1.8/gems/p4ruby-1.0.7/lib/P4.rb Should I set an env var? If so, which and where? -Johnny --~--~-~--~~~---~--~~ 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] Dirty.rb - confused
Hi Guys, I am working with Active Record 2.1.x and there is a file called dirty.rb. Now I might be missing something but within the function write_attribute_with_dirty there is a call to write_attribute_without_dirty. Where is the definition for this function? What happens after this call? Thanks, Tim. --~--~-~--~~~---~--~~ 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: export a table data to xml file using Ruby on Rails
Hi Devi, Try with following codes. let me know if you find any issues def xmlfile @records = Company.find(:all) render :xml=>@records.to_xml end def xmlfile @records = Company.find(:all) render :partial => '/company/xmlfile', :layout => false, :content_type => 'application/xml' end Thanks Saravanan K -- Posted via http://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 -~--~~~~--~~--~--~---