[Rails] Re: rake gems:freeze GEM=pdf-writer not working on MAC
It looks like Gem::Commands::UnpackCommand#get_path changed it's signature (from 2 args to 1) fairly recently - and much more recently than gemsonrails was last updated (July 2008 according to Github). You'll definitely want to switch to a different mechanism for vendoring gems. --Matt Jones On Jun 4, 12:39 am, Tushar Gandhi wrote: > Hi, > Here is the complete trace of error:- > Can anyone help me out what is wrong with my configuration? > > administrators-macbook:browsercms_demo Administrator$ rake gems:freeze > GEM=pdf-writer --trace > (in /railsproject/bcms/browsercms_demo) > DEPRECATION WARNING: Rake tasks in vendor/plugins/gemsonrails/tasks, > vendor/plugins/gemsonrails/tasks, vendor/plugins/gemsonrails/tasks, and > vendor/plugins/gemsonrails/tasks are deprecated. Use lib/tasks instead. > (called from > /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) > ** Invoke gems:freeze (first_time) > ** Execute gems:freeze > rake aborted! > wrong number of arguments (2 for 1) > /railsproject/bcms/browsercms_demo/vendor/plugins/gemsonrails/tasks/gems_fr > eeze.rake:41:in > `get_path' > /railsproject/bcms/browsercms_demo/vendor/plugins/gemsonrails/tasks/gems_fr > eeze.rake:41 > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in > `invoke_with_call_chain' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/mon > itor.rb:242:in > `synchronize' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31 > /usr/bin/rake:19:in `load' > /usr/bin/rake:19 > > Thanks, > Tushar > -- > 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] REE & application frozen gems
I have the following versions of ruby installed in my production env. ubuntu ~ > /usr/bin/ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] ubuntu ~ > /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby -v ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.01 I have frozen my gems in my application at /home/deploy/rails_apps/ my_app/vendor Do i need to reinstall all frozen gems of my application again in REE so that apache+passenger can pick it up? Where does apache look for gems? Wont it look into my vendor directory where i have frozen gems? -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: problem with database still sqlite3 and i want mysql
Thank you for all for your help, you are really helpful! I uninstalled all gems from gem list. Than I removed gem and than removed ruby. Then: 1. sudo apt-get install ruby ; ruby -v -> 1.8.7 2. sudo apt-get install rubygems ; gem -v -> 1.3.5. 3 sudo gem install rails ; rails -v or rails --version -> now gives me the proram raisl currently not installed. Immediately after install! I haven't typed a clear yet! If I try rails my_app : it works. With -d mysql: still sqlite 3 in the .yaml file. I reinstalled again. I also deleted everything from ubuntu software center. Then the first 2 steps. And then the 3. sudo gem install rails -include-dependencies. Now this -get opt problem like in the beginning. But rails does not work. :) Neither with sqlite3. Hopeless. Mysql still running. I should buy a Mac... :) Now I will remove, reinstall again, maybe one another way, include dependencies or not, export path or not, I try all of the versions. If anyone knows a way, which is coorectly works allways, than please put it to some ubuntu forum also, because every page say different way. Maybe only 5% of the developers have these problems - but very hard to be in this 5%. :) Thx a lot again! gezope On jún. 4, 02:30, Hassan Schroeder wrote: > On Wed, Jun 2, 2010 at 1:39 PM, Gerő Zoltán wrote: > > I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked: > > rails -v -> getopt: invalid option -- 'v' (I don't understand this one, it > > should be different?) > > Yes, it should work. > > > I reinstalled rails a few time, because first I forget > > -include-dependencies, or sudo, but now it seems okay > > No, it doesn't; the fact that it fails on a standard command-line option > means you can't expect anything correct out of it. > > I would get rid of that current Rails installation completely and start > from scratch. > > Good luck. > -- > Hassan Schroeder hassan.schroe...@gmail.com > twitter: @hassan -- 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-t...@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: Mac OS/X and Rails 3 ?
ShellScripter wrote: > Although i installed my RoR 3 with the precedence command , but i > recommend u the lazy package RubyStack > http://bitnami.org/stack/rubystack > give it a try! Irrelevant to the question and bad advice anyway. Rubystack doesn't seem particularly well suited to Mac OS. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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 breakpoint has weird idea of what local_variables a
> And the problems were...? I'll take another run at ActiveScaffold in a week or two. Right now, I'm applying ruiby-debug and logging in place of my long-years of inserting ad hoc debugging, e.g puts in Ruby or printf in C++. But I'm letting A.S. distract me from my current path. Nevertheless, thanks for asking. I WILL get back to A.S. soon. Best wishes, Richard On Jun 4, 7:34 pm, Marnen Laibow-Koser wrote: > RichardOnRails wrote: > > Hi Marnen, > > >> ActiveScaffold is dead simple to use. Perhaps if you were to ask > >> questions about the problems you're actually having, we could help. > > > It probably is, but I've run into problems a couple of times, > > And the problems were...? > > > so I > > shelved the idea for the time being. Anyway, writing some Ruby to > > manipulate a Rails app is fun. > > Yes, and it's a great way to learn. Just be aware that you're > reinventing the wheel. > > > And I did post my question on the Ruby > > NG and Robert Klemme was helpful there. > > Great! > > > Talk to you soon, no doubt, > > Richard > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...@marnen.org > > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@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: Mac OS/X and Rails 3 ?
Although i installed my RoR 3 with the precedence command , but i recommend u the lazy package RubyStack http://bitnami.org/stack/rubystack give it a try! -- 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-t...@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: Ajax fails in IE8
Hi, Colin, Every page I make has to pass by W3C's validation. It's a pity why IE8 doesn't really support prototype and rails' JS helpers are made out of prototype... Any more ideas guys? Gordon On Jun 5, 1:17 am, Colin Law wrote: > Just a thought, have you checked that your html is valid by pasting > the complete page source into the w3c html validator? Differences > between browsers is often down to invalid html. > > Colin > -- 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-t...@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] Visual Effect: insert new stuff, then slide open
Hi guys: Thanks for your help so far - think I've progressed pretty far down the Rails front but I think I'm getting stuck, maybe you can help me out: I've got a twitter like app where I'm trying to display new tweets as they come in. This is what I'm doing right now: render :update do |page| page.insert_html :top, 'tweebs-box', :partial => 'livetweebs' end ...which, of course, takes the new content and inserts it before the current set on the screen. What i'd like to do is to have it slide down elegantly upon the insert, instead of just snap down. I've been thinking of an easy way to do this but this is the only way I can think of: maybe there is an easier way? 1. display the page the first time with a div for the current stuff and a hidden div above it for the new stuff to come 2. load the content into the hidden div 3. slide down the new div, thus pushing the current div down 4. insert a new div above this div for the next set to be inserted into Is there an easier way? Thanks...Chris -- 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-t...@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 breakpoint has weird idea of what local_variables a
RichardOnRails wrote: > Hi Marnen, > >> ActiveScaffold is dead simple to use. Perhaps if you were to ask >> questions about the problems you're actually having, we could help. > > It probably is, but I've run into problems a couple of times, And the problems were...? > so I > shelved the idea for the time being. Anyway, writing some Ruby to > manipulate a Rails app is fun. Yes, and it's a great way to learn. Just be aware that you're reinventing the wheel. > And I did post my question on the Ruby > NG and Robert Klemme was helpful there. > Great! > Talk to you soon, no doubt, > Richard Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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 breakpoint has weird idea of what local_variables a
Hi Marnen, > ActiveScaffold is dead simple to use. Perhaps if you were to ask > questions about the problems you're actually having, we could help. It probably is, but I've run into problems a couple of times, so I shelved the idea for the time being. Anyway, writing some Ruby to manipulate a Rails app is fun. And I did post my question on the Ruby NG and Robert Klemme was helpful there. Talk to you soon, no doubt, Richard On May 31, 3:44 pm, Marnen Laibow-Koser wrote: > RichardOnRails wrote: > > Geez, Marnen, > > > I don't see why people on a list focused on the most famous Ruby app > > would view it beneath themselves to address a fundamental Ruby > > question. > > It's not that they see it as "beneath themselves". It's simply that > this is a forum for Rails issues, and only for Rails issues. A simple > issue with the Ruby debugger is off topic here. Please ask your > question where it is on topic -- it will get seen by Ruby experts who > are familiar with the debugger but don't necessarily use Rails. > > > Incidentally, my question is, in fact, related to a Rails - a Rails > > application. > > No. It came up *in the course of* Rails development, but it is not a > Rails-related question as you've presented it. > > > My client for the Rails app wants to change a bunch of > > the app's field names. This is a job for a machine, say > > ActiveScaffold, for example. However, despite the documentation from > > ActiveScaffold.com and folks in the ActiveScaffold newsgroup, I still > > don't have that running. > > ActiveScaffold is dead simple to use. Perhaps if you were to ask > questions about the problems you're actually having, we could help. > > In other words, please explicitly ask the questions you actually want > answered. > > > > > Hence, I wrote my own tool (in Ruby, of course), which I hope to > > finish by tomorrow. But it's gotten complicated, which led to try > > introducing Ruby Debug rather than puts debugging statements. For > > this purpose, I was guided by Ruby Cookbook, O'Reilly, 2006. > > > I thought the RoR community might be sympathetic to a poor soul trying > > to build a Rails-app administration tool. > > It might. But your proximate problem is not with Rails. > > > Best wishes, > > Richard > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...@marnen.org > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: New to rails, a little model help please
Alex Smith wrote: > I knew it was going to be simple! Adding _id worked like a charm. Thanks > for the help. You're most welcome. BTW, are you the Alex Smith I used to work with? Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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] Problems with Ruby on Rails and Mechanize gem?
Hi all. I'm doing a web site using "WWW::Mechanize". >From my application, when I'm using the web site, I have a link, and when I make click on the Iink, I want to log with my google mail, this already works but now, I want to show the home page after logged. This is my source: require 'rubygems' require 'mechanize' def loggin user = 'someone_u...@gmail.com' pass = 'abc123' agent = WWW::Mechanize.new page = agent.get 'https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1
[Rails] Re: New to rails, a little model help please
I knew it was going to be simple! Adding _id worked like a charm. Thanks for the 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: New to rails, a little model help please
Alex Smith wrote: > Hey guys I'm having a little trouble what I think should be a pretty > simple relationship between tables. > > Player.rating is a f-key to Rating.id, both fields are integers > > When I try to add a new player I get this error message > > ActiveRecord::AssociationTypeMismatch in PlayersController#create > Rating(#38968656) expected, got String(#19165136) > > In my form I have this for the rating dropdown > f.select :rating, options_for_select(Rating.all.map { |r| [r.level, > r.id] }) > > In my models I have > > #player > has_one :rating > > #rating > belongs_to :player, :foreign_key => "id" You've got it backwards. foreign_key gives the name of the key on the other table, so in this case, it would be 'rating', not 'id'. But why not follow the Rails conventions, call the column Player.rating_id , and drop the foreign key clause? Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: New to rails, a little model help please
Also, here are the params passed to the server "player"=> { "first_name"=>"Alex", "last_name"=>"Zwinge", "email_address"=>"poolshark1...@hotmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "phone_number"=>"512-492-5708", "rating"=>"1", < correct value "city"=>"1", "gender"=>"0" }, "commit"=>"Register", "controller"=>"players", "action"=>"create" -- 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-t...@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] New to rails, a little model help please
Hey guys I'm having a little trouble what I think should be a pretty simple relationship between tables. Player.rating is a f-key to Rating.id, both fields are integers When I try to add a new player I get this error message ActiveRecord::AssociationTypeMismatch in PlayersController#create Rating(#38968656) expected, got String(#19165136) In my form I have this for the rating dropdown f.select :rating, options_for_select(Rating.all.map { |r| [r.level, r.id] }) In my models I have #player has_one :rating #rating belongs_to :player, :foreign_key => "id" The controller is pretty straight forward def create @player = Player.new(params[:player]) respond_to do |format| if @player.save flash[:notice] = "Registration Successful" format.html { redirect_to root_url } else flash[:notice] = "Error in registration" format.html { render :action => "new" } end end end Any guidance? -- 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-t...@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] Mac OS/X and Rails 3 ?
Hello List, Label me a newb, but how do you install Rails 3 on your Mac? Google sent me to these URLs: http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release/ http://guides.rails.info/3_0_release_notes.html http://asciicasts.com/episodes/200-rails-3-beta-and-rvm >From early Feb 2010 I see this short recipe: gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n gem install rails --pre On April 1 2010 we have this from DHH: gem install rails --prerelease after you make sure you’re on Ruby Gems 1.3.6 with gem update --system But today is June 4 2010 and I'm curious if there is a more current way to install Rails 3 on a Mac? Also I noticed this on github.com: http://github.com/rails/rails/tree/v3.0.0.beta.3 How do I install that? If it were rails 2.x I would just git-clone it into /vendor/ and call it /rails/ Side note, my Ruby comes from rvm and it currently looks like this: $ $ ruby -v ruby 1.9.3dev (2010-06-04 trunk 28157) [i386-darwin9.8.0] $ $ $ $ gem list *** LOCAL GEMS *** rake (0.8.7) $ $ $ $ which gem /Users/maco/.rvm/rubies/ruby-1.9.2-head/bin/gem $ $ $ $ gem -v 1.3.7 $ $ Help !?!? -- 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-t...@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: Ajax, jQuery
Marnen Laibow-Koser wrote: > Ralph Shnelvar wrote: >> I am not sure where I should post this since this seems to be an >> "interdisciplinary" problem >> >> I am having trouble communicating between my javascript and my Rails >> app. >> > [...] > > Now that you've shown us your code, please explain how the actual > behavior of your app differs from what you want it to do. > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org I would like a success return and the data returned. The return is now taking the error return. -- 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-t...@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 3] How to refer to birthday(1i) in a AR
Hi , there , first of all i wanna to express my regard to the Rails 3 dev. team's effort , the work is really amazing ! Really speed up a lot the performance !! Well , i still a rookie guy and have a question for ask T_T : i have two association ARs : User has_one Account , and i have used the accepts_nested_forms for get all create up for only one line of code in view : @user = User.new(params[:user] until this part i have done with the tutorial of RailsCast http://railscasts.com/episodes/196-nested-model-form-part-1 However , in my Account AR , there is a birthdate colum , ( t.date :birthdate in the migration) , i have used the date_select helper to generate the corresponding html code , and get the return values : year , month , day with birthday(1i) , birthday(2i) , birthday(3i) , i have tried to use the virtual attribute in the Account AR for combine all these values , but i can't refer them with attr_accessor :"birthday(1i)", :"birthday(2i)" , :"birthday(3i)". I don't know if there is another solution for kind of this , or another way to get my objective: get date(year, month, day) from html and combine name all in a birthday value for save @_...@?? Thx 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-t...@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] Free Webinar! Using Cucumber + Webrat to Test Ruby Apps in the Cloud
Thursday, June 15, 2010 at 11 am PDT Register here: http://bit.ly/abJDuC Cucumber, a Ruby on Rails tool, is incredibly useful for the full- stack testing of web applications. Using domain-specific language that reads similarly to plain English, it allows non-technical domain experts to write executable requirement specs. By default, Cucumber comes packaged with Webrat, a powerful testing tool that emulates a browser that is many times faster than a normal one. Though Webrat lacks support for JavaScript, it can be configured to use Selenium to test for any cross-browser quirks in the JavaScript code using live browsers. In this webinar, Sauce Labs Developer Sean Grove will demonstrate how to quickly set up a Cucumber application from scratch, and then configure it to effortlessly switch between Webrat and Selenium. We'll discuss the advantages of each tool and how to know which tool best fits the situation. Finally, we'll go over how to overcome some of the biggest problems of Cucumber and Selenium by using the Sauce OnDemand platform. Who should attend: Web developers and QAs with any level of Selenium skills Current testing environment: Preferably Ruby + Cucumber Hosted by: http://saucelabs.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-t...@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: Alternative to ActiveRecord for populating model objects
Marnen Laibow-Koser wrote: > If you disagree with the advice you're getting, that's fine. If you're > claiming that there is no right or wrong...well...then I don't want to > be the one maintaining your codebase. :) I actually write beautiful code, it's sexy too. Relax and have a nice weekend...oh, and thanks for the advice :-D -- 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-t...@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.
Re: [Rails] Re: regular expression
Well, Google found this one pretty quick: http://www.mizar.dk/XPath/Default.aspx Maybe it can find others, too, if that one doesn't work for you. -Rob On Jun 4, 2010, at 4:40 PM, chewmanfoo wrote: Do you know a site of that quality (rubular.com) for XPath??? That site rocks!!! On Jun 4, 1:16 pm, Srinivas Golyalla wrote: ENTERhttp://rubular.com/ I Need regular expression that will match the string '123_456_7890' not '123_456_789' On Jun 4, 9:38 am, Peter De Berdt wrote: On 04 Jun 2010, at 14:28, Srinivas Golyalla wrote: Can u help me in simple regular expression that will match the string ‘123_456_7890’ but not ‘123_456_789’. The thing you're asking is not very specific, there's a lot to be interpreted, but this might be what you are looking for: \d{3}_ \d{3}_ \d{4} Best regards Peter De Berdt -- 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- t...@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 . Rob Biedenharn http://agileconsultingllc.com r...@agileconsultingllc.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-t...@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: regular expression
Do you know a site of that quality (rubular.com) for XPath??? That site rocks!!! On Jun 4, 1:16 pm, Srinivas Golyalla wrote: > ENTERhttp://rubular.com/ > > I Need regular expression that will match the string '123_456_7890' > not '123_456_789' > > On Jun 4, 9:38 am, Peter De Berdt wrote: > > > > > On 04 Jun 2010, at 14:28, Srinivas Golyalla wrote: > > > > Can u help me in simple regular expression that will match the string > > > ‘123_456_7890’ but not ‘123_456_789’. > > > The thing you're asking is not very specific, there's a lot to be > > interpreted, but this might be what you are looking for: \d{3}_\d{3}_ > > \d{4} > > > Best regards > > > Peter De Berdt -- 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-t...@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: Ajax, jQuery
Ralph Shnelvar wrote: > I am not sure where I should post this since this seems to be an > "interdisciplinary" problem > > I am having trouble communicating between my javascript and my Rails > app. > [...] Now that you've shown us your code, please explain how the actual behavior of your app differs from what you want it to do. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: Alternative to ActiveRecord for populating model objects
Raf Jaf wrote: > > >> JMS: not sure. Mainframes: sure, if they expose the proper interface. > > I am interested in native support. Of course it's possible to integrate > Ruby with a mainframe if the mainframe exposed a http endpoint; this is > beyond obvious. And what would a native interface be in this case? "Mainframes" can run lots of different DB servers. > >> In this case, you are wrong. Rails is a full-stack framework. If >> you're not going to use most of the stack, there is no point in >> incurring the extra overhead of using it in your project. > > No such thing as right and wrong; the world is grey. Of course there are such things as right and wrong. And that's even more true where it concerns proper development practice than abstract philosophy. If you disagree with the advice you're getting, that's fine. If you're claiming that there is no right or wrong...well...then I don't want to be the one maintaining your codebase. :) Development and architecture are all about value judgements -- deciding what the right way to do things is for a particular set of conditions. And with that, let's leave philosophy and return to software development. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: Alternative to ActiveRecord for populating model objects
> JMS: not sure. Mainframes: sure, if they expose the proper interface. I am interested in native support. Of course it's possible to integrate Ruby with a mainframe if the mainframe exposed a http endpoint; this is beyond obvious. > In this case, you are wrong. Rails is a full-stack framework. If > you're not going to use most of the stack, there is no point in > incurring the extra overhead of using it in your project. No such thing as right and wrong; the world is grey. -- 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-t...@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] Ajax, jQuery
I am not sure where I should post this since this seems to be an "interdisciplinary" problem I am having trouble communicating between my javascript and my Rails app. Here's the snipped of code from my controller - - - def poll p params puts "Got here:" # debugger @some_object = 12345 respond_to do |format| format.json { render :layout => false, :json => @some_object } end end - - - I see - - - {"comment"=>"ch", "_method"=>"PUT", "action"=>"poll", "controller"=>"reviews", "_"=>"1275680223825"} Got here: - - - in the Webrick console log Here's the relevant javascript: - - - - pollWithAjax = function() { $.ajax( { // Define AJAX properties. type: "GET", url: "/poll", dataType: "script", data: { _method: 'PUT', "comment": 'ch' }, timeout: (10 * 1000), beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "application/json")}, // Define the succss method. success: function(){ alert('pollWithAjax Success') }, // Define the error method. error: function( objAJAXRequest, strError, errorThrown ){ alert("pollWithAjax Error! Type: " + strError); } } ); }; - - - - The "error:" function returns with the value of strError being "error". This is what FireBug says my headers look like - - - Response Headersview source Request Headersview source Host localhost:3000 User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729) Accept application/json Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive X-Requested-With XMLHttpRequest Referer http://localhost:3000/products/1 Cookie _store_session=BAh7CDoPc2Vzc2lvbl9pZCIlZDZhNDMyMjI2OTNhMTAzNTQxZjVmNTA5MDIwOTc1MDUiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhhc2h7AAY6CkB1c2VkewA6EF9jc3JmX3Rva2VuIjFnREJwbW9Oam02NFArWWxla1dXUE1OMmk2eU9EUk9lWnhDMDF4WHA0QUtFPQ%3D%3D--582cb4d8997a9876030fa55e15d37e12177b02db - - - When I click on the response tab in Firebug, I see nothing. Am I setting up the headers incorrectly? -- 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-t...@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: sqlite specified in database.yml, rails tries to use mysql
Trausti Thor Johannsson wrote: > Have you checked which environment you are running in ? > > Have you removed ALL mysql config from database.yml ? > > > Trausti Solved. I double checked both of these items, but both were in order. I solved the problem by grabbing hold of a libmysql.dll file and dumping it in C:\Ruby\bin, and all was well. Windows is so touchy... 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-t...@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.
Re: [Rails] sqlite specified in database.yml, rails tries to use mysql
Have you checked which environment you are running in ? Have you removed ALL mysql config from database.yml ? Trausti On Fri, Jun 4, 2010 at 8:40 PM, Les Peabody wrote: > Hi All, > > I've run into an interesting (and annoying) problem. I have a > development environment on a Windows machine and on a remote Linux > machine. I cloned my environment on the Linux machine over to my > Windows box. I have installed all the required gems for the project. > When I try to reconfigure database.yml to use sqlite3 instead of mysql, > and when I try to do a 'rake db:schema:load' I get prompted with an > error box saying: > > "The program can't start because LIBMYSQL.dll is missing from your > computer. Try reinstalling the program to fix this problem." > > I have no idea why it would even be trying to access a mysql dll if I > specified that it should be using sqlite3. Any thoughts? > > Thanks, > Les > -- > 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-t...@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. > > -- 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-t...@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.
Re: [Rails] Re: Alternative to ActiveRecord for populating model objects
On Jun 4, 2010, at 2:39 PM, Raf Jaf wrote: Marnen Laibow-Koser wrote: Raf Jaf wrote: According to my research, I have found nothing to indicate Rails/Ruby supports native integration with JMS and mainframes. It was only last week that we looked at Rails for the first time, simply because we want our client-exposed interfaces to be RESTful. Perhaps Rails is overkill, but do you think Ramaze or Sinatra are better because they are more lightweight? They are still built on Ruby, which puts us back in the boat: bridging the gap between Ruby and Java. I found this article moments ago which discusses how to implement ActiveRecord in Java. If I can get this to work in Rails with a custom Java implementation that hooks into our Java data services, then my problem is solved. Rails is an end-to-end solution. Either use it as one... I don't agree with this comment. In my experience there is nothing wrong with using special aspects of one framework alongside other technologies. Anyway, thanks for the info. If you look at JRuby rather than 3 year old articles about AR in Java, you might be in a very happy place. JRuby lets you call Java from Ruby and there would be essentially zero cost to it. You can run Rails under JRuby, too. -Rob Rob Biedenharn http://agileconsultingllc.com r...@agileconsultingllc.com http://gaslightsoftware.com r...@gaslightsoftware.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-t...@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] Embedding a form is lots of various place
Hi, I've been asked to put a 'contact us' form in many and various places on our site. Initially, I proposed we simply link to the contact us form, which is already handled by a model, view and controller, but the users would like the form itself to appear. I can certainly enclose the form in a partial, and include the partial, but then it seems I have to update many and various controllers with code to support the form loading, submission, and saving. It doesn't seem very dry. Another thought - I could build the contact form controller and view(s) with no layout, and then include the URL to the contact form wherever necessary via iframe. I think that would be workable, but doesn't seem very rails-like. Is there a rails idiom for including what I would term 'an unrelated and self contained form' within some other model/view/controller ? Thank you. Regards, Rich -- 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-t...@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: Alternative to ActiveRecord for populating model objects
Raf Jaf wrote: [...] > According to my research, I have found nothing to indicate Rails/Ruby > supports native integration with JMS and mainframes. > JMS: not sure. Mainframes: sure, if they expose the proper interface. DataFabric might also help you. > It was only last week that we looked at Rails for the first time, simply > because we want our client-exposed interfaces to be RESTful. Rails is not the only RESTful game in town. > Perhaps > Rails is overkill, but do you think Ramaze or Sinatra are better because > they are more lightweight? Not lightweight so much as modular. Rails generally wants to use AR or something similar (though this is less true of Rails 3 than Rails 2). > They are still built on Ruby, which puts us > back in the boat: bridging the gap between Ruby and Java. Easy. JRuby or RJB. > > I found this article moments ago which discusses how to implement > ActiveRecord in Java. If I can get this to work in Rails with a custom > Java implementation that hooks into our Java data services, then my > problem is solved. You shouldn't need to do it that way, if I understand correctly. > >> Rails is an end-to-end solution. Either use it as one... > > I don't agree with this comment. In my experience there is nothing wrong > with using special aspects of one framework alongside other > technologies. In this case, you are wrong. Rails is a full-stack framework. If you're not going to use most of the stack, there is no point in incurring the extra overhead of using it in your project. > > Anyway, thanks for the info. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: Alternative to ActiveRecord for populating model objects
Here is that article about implementing ActiveRecord in Java http://peterbacklund.blogspot.com/2007/07/implementing-activerecord-in-java.html -- 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-t...@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] Ajax post from a mobile app
Hi, I'm a trying to create a user using Ajax from a mobile app with javascript and I'm struggling!!! Here is what I'm trying: user = {username:'plop', password:'plip', password_confirmation:'plip'}; new Ajax.Updater('all', HOST + 'users/create',{ method: 'POST', parameters:{'user': user} }); When I look at the log It seems that is doesn't recognize first that is a POST method and it doesn't recognize my user parameter. Here is the log: Processing UsersController#create (for 127.0.0.1 at 2010-06-04 20:40:07) [OPTIONS] Parameters: {"action"=>"create", "controller"=>"users"} Here is how it should be: Processing UsersController#create (for 127.0.0.1 at 2010-06-04 20:35:46) [POST] Parameters: {"commit"=>"Submit", "action"=>"create", "authenticity_token"=>"/fkA8CQVp88xDB1Tbf/T2OHldbpc0QQlsBk7yk/7mxA=", "controller"=>"users", "user"=>{"password_confirmation"=>"[FILTERED]", "username"=>"toto", "password"=>"[FILTERED]"}} Greg -- 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-t...@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] sqlite specified in database.yml, rails tries to use mysql
Hi All, I've run into an interesting (and annoying) problem. I have a development environment on a Windows machine and on a remote Linux machine. I cloned my environment on the Linux machine over to my Windows box. I have installed all the required gems for the project. When I try to reconfigure database.yml to use sqlite3 instead of mysql, and when I try to do a 'rake db:schema:load' I get prompted with an error box saying: "The program can't start because LIBMYSQL.dll is missing from your computer. Try reinstalling the program to fix this problem." I have no idea why it would even be trying to access a mysql dll if I specified that it should be using sqlite3. Any thoughts? Thanks, Les -- 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-t...@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: Alternative to ActiveRecord for populating model objects
Marnen Laibow-Koser wrote: > Raf Jaf wrote: > [...] >> The point of avoiding ActiveRecord is because our data sources are >> disparate, meaning that they include databases, mainframes, and, in some >> cases, sources that expose only a message-based interfaces (JMS, etc). > > ActiveRecord and ActiveResource will have no problem with this. > >> Furthermore, data from these sources needs to be mapped and processed >> through rules before being populated in model objects and presented to >> the client. Our Java data services layer handles all of this, so it's >> just a matter of integration Rails/Ruby with that interface. > > Don't bother. ActiveRecord can handle that too. > >> We intend >> to use Rails for our presentation tier only, not as a end-to-end >> solution. > > Then you are making a very poor decision. Stop now. Rails is an > end-to-end solution. Either use it as one or go with something like > Sinatra or Ramaze that is better suited to your use case. >> > >> The Java framework already exists, and we want to reuse what we have >> available. >> >> Does that make sense now? > > No, for the reasons above. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org According to my research, I have found nothing to indicate Rails/Ruby supports native integration with JMS and mainframes. It was only last week that we looked at Rails for the first time, simply because we want our client-exposed interfaces to be RESTful. Perhaps Rails is overkill, but do you think Ramaze or Sinatra are better because they are more lightweight? They are still built on Ruby, which puts us back in the boat: bridging the gap between Ruby and Java. I found this article moments ago which discusses how to implement ActiveRecord in Java. If I can get this to work in Rails with a custom Java implementation that hooks into our Java data services, then my problem is solved. > Rails is an end-to-end solution. Either use it as one... I don't agree with this comment. In my experience there is nothing wrong with using special aspects of one framework alongside other technologies. Anyway, thanks for the info. -- 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-t...@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: Re: Alternative to ActiveRecord for populating model ob
Rob Biedenharn wrote: [...] > > > Reusing code that exists and WORKS is typically a very sensible idea. Quite so. The bad idea here is using Rails only for the presentation tier. If the OP is really dead-set on using Rails and on reusing the Java data access framework, then the right thing to do is to write an AR interface to the data access framework. > Assuming that the others system from which the data comes will remain, > creating ruby models that wrap the existing data source is fine. (And > avoids duplication!) With the separation of modules in Rails 3, you > should even make those models behave sufficiently like an ActiveRecord- > based model with relative ease. Right. That's the *only* way in which I'd even consider using Rails in the OP's situation: writing an AR interface to the existing data access framework, if AR cannot replace it altogether. But it really sounds to me like the OP is making his own life difficult by trying to shove Rails in somewhere that it doesn't really fit. > > -Rob > > Rob Biedenharn > http://agileconsultingllc.com > r...@agileconsultingllc.com > http://gaslightsoftware.com > r...@gaslightsoftware.com Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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.
Re: [Rails] Re: Alternative to ActiveRecord for populating model objects
On Jun 4, 2010, at 2:10 PM, Marnen Laibow-Koser wrote: Raf Jaf wrote: [...] The point of avoiding ActiveRecord is because our data sources are disparate, meaning that they include databases, mainframes, and, in some cases, sources that expose only a message-based interfaces (JMS, etc). ActiveRecord and ActiveResource will have no problem with this. Oh? ActiveResource can have a JMS queue as an input? Furthermore, data from these sources needs to be mapped and processed through rules before being populated in model objects and presented to the client. Our Java data services layer handles all of this, so it's just a matter of integration Rails/Ruby with that interface. Don't bother. ActiveRecord can handle that too. We intend to use Rails for our presentation tier only, not as a end-to-end solution. Then you are making a very poor decision. Stop now. Rails is an end-to-end solution. Either use it as one or go with something like Sinatra or Ramaze that is better suited to your use case. The Java framework already exists, and we want to reuse what we have available. Does that make sense now? No, for the reasons above. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Reusing code that exists and WORKS is typically a very sensible idea. Assuming that the others system from which the data comes will remain, creating ruby models that wrap the existing data source is fine. (And avoids duplication!) With the separation of modules in Rails 3, you should even make those models behave sufficiently like an ActiveRecord- based model with relative ease. -Rob Rob Biedenharn http://agileconsultingllc.com r...@agileconsultingllc.com http://gaslightsoftware.com r...@gaslightsoftware.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-t...@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: regular expression
ENTER http://rubular.com/ I Need regular expression that will match the string '123_456_7890' not '123_456_789' On Jun 4, 9:38 am, Peter De Berdt wrote: > On 04 Jun 2010, at 14:28, Srinivas Golyalla wrote: > > > Can u help me in simple regular expression that will match the string > > ‘123_456_7890’ but not ‘123_456_789’. > > The thing you're asking is not very specific, there's a lot to be > interpreted, but this might be what you are looking for: \d{3}_\d{3}_ > \d{4} > > Best regards > > Peter De Berdt -- 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-t...@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: Alternative to ActiveRecord for populating model objects
Raf Jaf wrote: [...] > The point of avoiding ActiveRecord is because our data sources are > disparate, meaning that they include databases, mainframes, and, in some > cases, sources that expose only a message-based interfaces (JMS, etc). ActiveRecord and ActiveResource will have no problem with this. > Furthermore, data from these sources needs to be mapped and processed > through rules before being populated in model objects and presented to > the client. Our Java data services layer handles all of this, so it's > just a matter of integration Rails/Ruby with that interface. Don't bother. ActiveRecord can handle that too. > We intend > to use Rails for our presentation tier only, not as a end-to-end > solution. Then you are making a very poor decision. Stop now. Rails is an end-to-end solution. Either use it as one or go with something like Sinatra or Ramaze that is better suited to your use case. > > The Java framework already exists, and we want to reuse what we have > available. > > Does that make sense now? No, for the reasons above. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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 show a Timer for lock expiry when editing a recor
Vijay wrote: > I'm newbie to ruby on rails. > In my application, i was trying to show the remaining time the user is > allowed to edit an instance record( like milestones, cheklists etc.). > I was locking it from multiple users to edit it at the sametime. > When the user clicks the edit link_to i need to display the timer in > the edit.rhtml I thought for a second about attempting to answer this, but quickly realized. DO NOT DO THIS! Pessimistic locking on databases is very, very bad form. Do not attempt to prevent concurrent editing. You're just asking for trouble. Users of modern applications will not accept pessimistic style record locking. Instead, develop a recovery solution based on an optimistic locking scheme. ActiveRecord has some built-in support for optimistic locking, which will get you started. If the optimistic locking mechanism detects concurrent edits then present that to the user with enough information to recover. P.S. Using *.rhtml extensions is so one-dot-ex. If you're using a version of Rails 2.0 or higher, switch your views to use *.html.erb. -- 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-t...@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: Alternative to ActiveRecord for populating model objects
Marnen Laibow-Koser wrote: > Raf Jaf wrote: >> Hi, >> >> We are using Ruby on Rails for an internal project. The data for our >> model objects exists in many different data sources (database, >> mainframe, etc), so we we need to avoid using ActiveRecord. > > That doesn't follow. ActiveRecord is capable of dealing with multiple > databases. What's the point of avoiding it? > >> Our >> development teams built a data service layer in Java that provides >> access to our company's information. We want to place Ruby/Rails in >> front of this data service layer and integrate our model components to >> get populated from that same Java layer. >> >> So, we want to replace ActiveRecord in our model classes and replace it >> with code integrated with our Java data services framework. Is there an >> example that demonstrates how to replace ActiveRecord with Java code? > > Can't you just use ActiveRecord and ActiveResource? You probably don't > need the Java framework, unless there's something I don't understand > here. > >> >> Thank you > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org The point of avoiding ActiveRecord is because our data sources are disparate, meaning that they include databases, mainframes, and, in some cases, sources that expose only a message-based interfaces (JMS, etc). Furthermore, data from these sources needs to be mapped and processed through rules before being populated in model objects and presented to the client. Our Java data services layer handles all of this, so it's just a matter of integration Rails/Ruby with that interface. We intend to use Rails for our presentation tier only, not as a end-to-end solution. The Java framework already exists, and we want to reuse what we have available. Does that make sense now? -- 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-t...@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: Alternative to ActiveRecord for populating model objects
Raf Jaf wrote: > Hi, > > We are using Ruby on Rails for an internal project. The data for our > model objects exists in many different data sources (database, > mainframe, etc), so we we need to avoid using ActiveRecord. That doesn't follow. ActiveRecord is capable of dealing with multiple databases. What's the point of avoiding it? > Our > development teams built a data service layer in Java that provides > access to our company's information. We want to place Ruby/Rails in > front of this data service layer and integrate our model components to > get populated from that same Java layer. > > So, we want to replace ActiveRecord in our model classes and replace it > with code integrated with our Java data services framework. Is there an > example that demonstrates how to replace ActiveRecord with Java code? Can't you just use ActiveRecord and ActiveResource? You probably don't need the Java framework, unless there's something I don't understand here. > > Thank you Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: Alternative to ActiveRecord for populating model objects??
Ivan Nastyukhin wrote: > active resource > with rest api from your java model > > or jruby and use natvie java classes > Ivan Nastyukhin > dieinz...@me.com So when using ActiveResource as the base for a model class, it basically populates the model using an external http resource? Like this... class Person < ActiveResource::Base self.site = "http://api.people.com:3000/"; end -- 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-t...@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] Integrum is Hiring!
We're growing again at Integrum. With a stable of long term clients and growth in the mobile development side as well, we're looking to bring in some more talented developers to our team. We're currently looking for Rails developers from n00b to the cliched 'rockstar' level. We do real Agile (capital A because we don't fake it) and SCRUM development, so you'll have to be comfortable talking with clients on a regular basis. If you've got an interest in iPhone or Android development to go along with the Rails stuff, that's a nice bonus too. These are full time positions, on-site at our office in Chandler Arizona (Phoenix Metro Area), so you must be able to work legally full time in the US. Benefits, perks, Pac-Man, we've got all those. Salary is dependent on experience. Please feel free to pass this around to anyone who may be looking for a great place to work. Please contact me off list at con...@integrumtech.com for more information, or h...@integrumtech.com if you want to tell me why you would like to work with us. -- 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-t...@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.
Re: [Rails] Alternative to ActiveRecord for populating model objects??
active resource with rest api from your java model or jruby and use natvie java classes Ivan Nastyukhin dieinz...@me.com On Jun 4, 2010, at 8:11 PM, Raf Jaf wrote: > Hi, > > We are using Ruby on Rails for an internal project. The data for our > model objects exists in many different data sources (database, > mainframe, etc), so we we need to avoid using ActiveRecord. Our > development teams built a data service layer in Java that provides > access to our company's information. We want to place Ruby/Rails in > front of this data service layer and integrate our model components to > get populated from that same Java layer. > > So, we want to replace ActiveRecord in our model classes and replace it > with code integrated with our Java data services framework. Is there an > example that demonstrates how to replace ActiveRecord with Java code? > > 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-t...@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. > -- 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-t...@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] Alternative to ActiveRecord for populating model objects??
Hi, We are using Ruby on Rails for an internal project. The data for our model objects exists in many different data sources (database, mainframe, etc), so we we need to avoid using ActiveRecord. Our development teams built a data service layer in Java that provides access to our company's information. We want to place Ruby/Rails in front of this data service layer and integrate our model components to get populated from that same Java layer. So, we want to replace ActiveRecord in our model classes and replace it with code integrated with our Java data services framework. Is there an example that demonstrates how to replace ActiveRecord with Java code? 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-t...@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: Re: Can Rails cache a Controller "as long as code not c
Colin Law wrote: > On 4 June 2010 15:23, Marnen Laibow-Koser wrote: >> Jian Lin wrote: >>> At work, we have a situation where when >>> >>> � script/server >>> >>> is run, then all the controller code is cached. �This is to speed up the >>> development server. �But that will mean that whenever we change the >>> controller code, we need to restart the server. >> >> Yes, that's normal behavior in development mode. > > I thought that was the normal behaviour in production mode, not > development. Right you are. I didn't write the word I meant to write. :P > > Colin Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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.
Re: [Rails] How to specify which database we're using?
On 4 June 2010 15:45, Andy Jeffries wrote: > rake db:seed RAILS_ENV=test Will that work? I realise that it will seed the test db but I thought that test db was cleared and refilled from fixtures for each test. Colin > > -- > Andy Jeffries > http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery > Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS > Company number: 5452840 > > > On 4 June 2010 15:31, Ramos wrote: >> >> I am seeding my environment for testing, but I am doing it upon my >> development environment, and in fact I'd like to seed my test >> environment... >> >> How can I do that? >> >> -- >> 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-t...@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. >> > > -- > 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-t...@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. > -- 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-t...@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.
Re: [Rails] Re: Can Rails cache a Controller "as long as code not change
On 4 June 2010 15:23, Marnen Laibow-Koser wrote: > Jian Lin wrote: >> At work, we have a situation where when >> >> script/server >> >> is run, then all the controller code is cached. This is to speed up the >> development server. But that will mean that whenever we change the >> controller code, we need to restart the server. > > Yes, that's normal behavior in development mode. I thought that was the normal behaviour in production mode, not development. Colin > >> >> So we can turn off the caching of controller code all together. But >> can't there be mechanism that is similar to the inclusion of javascript >> >> foo.js?1273424325 >> >> which is to use the cached version as long as there is no code change, >> but recompile it when there is code change? > > Because it's a different kind of caching. JavaScript caching simply > involves using the browser cache for included files, whereas controller > caching involves Ruby objects in memory on the server. > >> >> Maybe because we use HAML and SASS a lot, loading some page (such as the >> homepage of the site) can take 40 seconds on the dev environment and it >> is quite long. > > Haml and Sass shouldn't be having that effect. Look elsewhere for your > problems. > > The fact that you're asking this makes me think that you want *page* > caching, not controller caching. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org > > -- > 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-t...@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. > > -- 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-t...@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.
Re: [Rails] Ajax fails in IE8
On 4 June 2010 13:58, ct9a wrote: > hi guys, > > I am testing a new optional funtionality in my site with IE 8 after > success with Firefox 3.6.3, chrome and safari. > > The new functionality basically sees a "sub category" drop down list > get generated in my form as soon as a "Category" value is selected > from the "Category" drop down list. > > I have been using the standard rails api such as observe_field, and > collective_select. > > Anyway, when I loaded up the webpage on IE8 and selected a value from > the "Category" drop down list, the form fails to show the subcategory > drop down list. > > Ajax doesn't seem to be working here in IE8. Just a thought, have you checked that your html is valid by pasting the complete page source into the w3c html validator? Differences between browsers is often down to invalid html. Colin > I know that rails uses prototype. > I have read that prototype 1.6RC2 is fully compatible with IE 8 > (http://www.prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8- > compatibility-element-storage-and-bug-fixes) . > I downloaded it and reloaded the webpage . No difference. > > 1) has anyone managed to get around the problem whereby ajax use in > IE8 fails? > 2) has anyone got an alternative such as using observe_field/ > observe_form and calling the whole url (appended with the selected > values at the time to load the other dynamic values (in this case, > category id which is appended to the url which would then load the > whole page with a bunch of sub category values ) )? > > 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-t...@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. > > -- 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-t...@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: Scheduled tasks in Rails: Cron + wget = Best solution?
Thanks for all your suggestions! (I like rufus-scheduler pretty much -> small memory foot print...) -- 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-t...@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: Running Application
On Jun 4, 11:00 am, Peter Hickman wrote: > Oops sorry about that, it usually works for me. It's fine. My solution is to go to Virtual Box. -- 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-t...@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.
Re: [Rails] Re: Running Application
On 4 June 2010 15:55, anon_comp wrote: > > When you find it you could copy it into c:\windows\system (or somewhere > > similar under c:\windows that has a whole load of DLLs in it already). > > I copied it over and now my system has gone haywire. Not your fault. I > think the developers should've had a dll that correlates with Ruby > 1.9.1 > Oops sorry about that, it usually works for me. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@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: Running Application
> Have you looked for it on your hard disk? It may be already installed but > not in a place that the application can find it. Yeah, it's in my hard disk when I install Ruby 1.8.7 =/ > When you find it you could copy it into c:\windows\system (or somewhere > similar under c:\windows that has a whole load of DLLs in it already). I copied it over and now my system has gone haywire. Not your fault. I think the developers should've had a dll that correlates with Ruby 1.9.1 > If course if it's already there then I'm stumped -- 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-t...@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 specify which database we're using?
Thanks. On 4 Jun, 15:45, Andy Jeffries wrote: > rake db:seed RAILS_ENV=test > > -- > Andy Jeffrieshttp://andyjeffries.co.uk/ #rubyonrails #mysql #jquery > Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS > Company number: 5452840 > > On 4 June 2010 15:31, Ramos wrote: > > > I am seeding my environment for testing, but I am doing it upon my > > development environment, and in fact I'd like to seed my test > > environment... > > > How can I do that? > > > -- > > 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-t...@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. -- 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-t...@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.
Re: [Rails] Re: Running Application
On 4 June 2010 15:32, anon_comp wrote: > On Jun 4, 10:22 am, Ivan Nastyukhin wrote: > > the next, add this dll to library path, or system folder > > Now the issue is finding the dll. I tried looking it up in Google and > failed to find it. > > Have you looked for it on your hard disk? It may be already installed but not in a place that the application can find it. When you find it you could copy it into c:\windows\system (or somewhere similar under c:\windows that has a whole load of DLLs in it already). If course if it's already there then I'm stumped -- 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-t...@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.
Re: [Rails] How to specify which database we're using?
rake db:seed RAILS_ENV=test -- Andy Jeffries http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS Company number: 5452840 On 4 June 2010 15:31, Ramos wrote: > I am seeding my environment for testing, but I am doing it upon my > development environment, and in fact I'd like to seed my test > environment... > > How can I do that? > > -- > 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-t...@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. > > -- 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-t...@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: click the address to display google map
examples: http://juixe.com/techknow/index.php/2007/02/07/rails-google-maps-plugin/ http://earthcode.com/blog/2006/04/rails_geocoding_and_google_map.html On Jun 4, 9:33 am, Marnen Laibow-Koser wrote: > Guo Yangguang wrote: > > hi > > My app has location for every user,i want the location to display a > > little google map in a way like ajax when clicking the location? I am a > > javascript and google map api idiot,can you help me? is there any > > tutorial? I have looked over the goog map api,but can not find the > > answer. > > Then ask in a Google Maps support forum, not here. This is not a Rails > issue. > > > Thanks! > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...@marnen.org > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@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: Running Application
On Jun 4, 10:25 am, Marnen Laibow-Koser wrote: > anon_comp wrote: > Don't insult people who are in a position to help you. I'm not intending to insult, I just don't like it when people point out the most obvious thing to solve the situation especially when it's in an error message. At any rate, I'll have to go down to Ruby 1.8.6 and see if this works. > > Thanks, > > Anon_comp > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...@marnen.org > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@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: click the address to display google map
Guo Yangguang wrote: > hi > My app has location for every user,i want the location to display a > little google map in a way like ajax when clicking the location? I am a > javascript and google map api idiot,can you help me? is there any > tutorial? I have looked over the goog map api,but can not find the > answer. Then ask in a Google Maps support forum, not here. This is not a Rails issue. > Thanks! Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: Running Application
On Jun 4, 10:22 am, Ivan Nastyukhin wrote: > yep) > the radical decision, its stop using rails and windows, many bugs wil be > waiting u in the future) Thank you. I'm totally aware of my inadequate OS, but I don't have much of a choice. I might just install Ubuntu > the next, add this dll to library path, or system folder Now the issue is finding the dll. I tried looking it up in Google and failed to find it. > Ivan Nastyukhin > dieinz...@me.com > > On Jun 4, 2010, at 6:20 PM, anon_comp wrote: > > > > > I'm getting an error message when I try to run my application (ruby > > script/server), normally I'd hit "OK" and the application would run > > without issues, but now it has completely failed to deploy. > > > I'm running on Windows 32, Ruby 1.9.1, Rails 2.3.8 > > > The message states: > > "This application has failed to start becuase msvcrt-ruby18.dll was > > not found. Re-installing the application may fix this problem." > > > Anyone knows what to do? Don't be a wise guy and say to re-install the > > application becuase I have. > > > Thanks, > > Anon_comp > > > -- > > 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-t...@googlegroups.com. > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text - > > - Show quoted text - -- 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-t...@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 specify which database we're using?
I am seeding my environment for testing, but I am doing it upon my development environment, and in fact I'd like to seed my test environment... How can I do that? -- 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-t...@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: undefined method `tab' for radiant
Smit Shah wrote: > Hi all... > > I am new to radiant cms. I have tried to install blog and liveblog > extensions. But in both cases I got the following error. > > rake aborted! > undefined method `tab' for # > > and > > rake aborted! > undefined method `tab' for # > > > Any idea? I am using radiant 0.8.1 This is a Radiant issue, not a general Rails issue. You'll get better help in the Radiant support forums. > > Thanks Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: Running Application
anon_comp wrote: > I'm getting an error message when I try to run my application (ruby > script/server), normally I'd hit "OK" and the application would run > without issues, but now it has completely failed to deploy. > > I'm running on Windows 32, Ruby 1.9.1, Rails 2.3.8 > > The message states: > "This application has failed to start becuase msvcrt-ruby18.dll was > not found. Re-installing the application may fix this problem." Check your Ruby installation. You're obviously missing a component. > > Anyone knows what to do? Don't be a wise guy and say to re-install the > application becuase I have. > Don't insult people who are in a position to help you. > Thanks, > Anon_comp Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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 Rails cache a Controller "as long as code not change
Jian Lin wrote: > At work, we have a situation where when > > script/server > > is run, then all the controller code is cached. This is to speed up the > development server. But that will mean that whenever we change the > controller code, we need to restart the server. Yes, that's normal behavior in development mode. > > So we can turn off the caching of controller code all together. But > can't there be mechanism that is similar to the inclusion of javascript > > foo.js?1273424325 > > which is to use the cached version as long as there is no code change, > but recompile it when there is code change? Because it's a different kind of caching. JavaScript caching simply involves using the browser cache for included files, whereas controller caching involves Ruby objects in memory on the server. > > Maybe because we use HAML and SASS a lot, loading some page (such as the > homepage of the site) can take 40 seconds on the dev environment and it > is quite long. Haml and Sass shouldn't be having that effect. Look elsewhere for your problems. The fact that you're asking this makes me think that you want *page* caching, not controller caching. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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.
Re: [Rails] Running Application
yep) the radical decision, its stop using rails and windows, many bugs wil be waiting u in the future) the next, add this dll to library path, or system folder Ivan Nastyukhin dieinz...@me.com On Jun 4, 2010, at 6:20 PM, anon_comp wrote: > I'm getting an error message when I try to run my application (ruby > script/server), normally I'd hit "OK" and the application would run > without issues, but now it has completely failed to deploy. > > I'm running on Windows 32, Ruby 1.9.1, Rails 2.3.8 > > The message states: > "This application has failed to start becuase msvcrt-ruby18.dll was > not found. Re-installing the application may fix this problem." > > Anyone knows what to do? Don't be a wise guy and say to re-install the > application becuase I have. > > Thanks, > Anon_comp > > -- > 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-t...@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. > -- 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-t...@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] Running Application
I'm getting an error message when I try to run my application (ruby script/server), normally I'd hit "OK" and the application would run without issues, but now it has completely failed to deploy. I'm running on Windows 32, Ruby 1.9.1, Rails 2.3.8 The message states: "This application has failed to start becuase msvcrt-ruby18.dll was not found. Re-installing the application may fix this problem." Anyone knows what to do? Don't be a wise guy and say to re-install the application becuase I have. Thanks, Anon_comp -- 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-t...@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: RE: MysQL and Ruby
Luciano Sousa wrote: > Hi man, > The mysql gem is default in rails, No it's not! It hasn't been since Rails 2.2. You need to install the mysql gem. > you only need to set the mysql db. > > __ > > Luciano Sousa > Linux User #456387 > http://www.lucianosousa.net Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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 show a Timer for lock expiry when editing a record
I'm newbie to ruby on rails. In my application, i was trying to show the remaining time the user is allowed to edit an instance record( like milestones, cheklists etc.). I was locking it from multiple users to edit it at the sametime. When the user clicks the edit link_to i need to display the timer in the edit.rhtml I have the javascript function for timer updation. when called it updates the text_field with the time. function update_timer() { var page_loaded_ms = new Date().getTime(); var timeout_ms = 100*1000; var time_left = Math.round((timeout_ms - new Date().getTime() + page_loaded_ms) / 1000); var minutes = Math.floor(time_left/60); var seconds = time_left - (minutes*60); $('time_left_value').value = 'Time left: '+ minutes + ' min' + zeroPad(seconds, 2)+ ' sec'; setTimeout("update_timer()", 1000); } function zeroPad(number, width) { var s = number.toString(); while (s.length < width) s = "0" + s; return s; } could anyone suggest me a solution for this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@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.
RE: [Rails] MysQL and Ruby
Hi man, The mysql gem is default in rails, you only need to set the mysql db. __ Luciano Sousa Linux User #456387 http://www.lucianosousa.net -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:rubyonrails-t...@googlegroups.com] On Behalf Of Ziburu Debian Sent: sexta-feira, 4 de junho de 2010 06:13 To: rubyonrails-talk@googlegroups.com Subject: [Rails] MysQL and Ruby Hi, what is necessary to install to use the database MySQL under Aptana (Rubyb 1.8.6) My config: Windows XP PRO SP2 Wamp5 1.7.4 with MysQL 5.0.45 Aptana 2.0.4 RubyGems 1.3.5 Ruby 1.8.6 -- 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-t...@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. -- 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-t...@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.
Re: [Rails] regular expression
On 04 Jun 2010, at 14:28, Srinivas Golyalla wrote: Can u help me in simple regular expression that will match the string ‘123_456_7890’ but not ‘123_456_789’. The thing you're asking is not very specific, there's a lot to be interpreted, but this might be what you are looking for: \d{3}_\d{3}_ \d{4} Best regards Peter De Berdt -- 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-t...@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: regular expression
On Jun 4, 1:28 pm, Srinivas Golyalla wrote: > Can u help me in simple regular expression that will match the string > ‘123_456_7890’ but not ‘123_456_789’. You're going to have to be a little more specific - the regular expression /0/ matches the first string and not the second but that's probably not what you wanted. Fred -- 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-t...@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: Command require
On Jun 4, 1:30 pm, Srinivas Golyalla wrote: > In Ruby there is a command called ‘require’. Explain what this command > means and write an example of how it is used to include a Ruby Gem in > a file. This sounds an awful lot like homework. The ruby api docs are at http://ruby-doc.org/core/ Fred -- 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-t...@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: Apache freezing with Passenger
> Has anyone else experienced such a problem? I have. And I did not know the reason why, but running Rails directly on port 80 not via Passenger/Apache does not have this problem. -- 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-t...@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] Command require
In Ruby there is a command called ‘require’. Explain what this command means and write an example of how it is used to include a Ruby Gem in a file. -- 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-t...@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] regular expression
Can u help me in simple regular expression that will match the string ‘123_456_7890’ but not ‘123_456_789’. -- 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-t...@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: Re: Compress css files with Rails
Peter De Berdt wrote: > On 04 Jun 2010, at 14:46, Greg Ma wrote: > >> What is Saas? > http://sass-lang.com/ > > > Best regards > > Peter De Berdt Wow Saas looks pretty cool! -- 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-t...@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] Ajax fails in IE8
hi guys, I am testing a new optional funtionality in my site with IE 8 after success with Firefox 3.6.3, chrome and safari. The new functionality basically sees a "sub category" drop down list get generated in my form as soon as a "Category" value is selected from the "Category" drop down list. I have been using the standard rails api such as observe_field, and collective_select. Anyway, when I loaded up the webpage on IE8 and selected a value from the "Category" drop down list, the form fails to show the subcategory drop down list. Ajax doesn't seem to be working here in IE8. I know that rails uses prototype. I have read that prototype 1.6RC2 is fully compatible with IE 8 (http://www.prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8- compatibility-element-storage-and-bug-fixes) . I downloaded it and reloaded the webpage . No difference. 1) has anyone managed to get around the problem whereby ajax use in IE8 fails? 2) has anyone got an alternative such as using observe_field/ observe_form and calling the whole url (appended with the selected values at the time to load the other dynamic values (in this case, category id which is appended to the url which would then load the whole page with a bunch of sub category values ) )? 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-t...@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.
Re: [Rails] Re: Compress css files with Rails
On 04 Jun 2010, at 14:46, Greg Ma wrote: Marnen Laibow-Koser wrote: If you use Sass (which I highly, highly recommend) then this is done for you. You get lots of other advantages too. Best, -- Marnen Laibow-Koser What is Saas? http://sass-lang.com/ Best regards Peter De Berdt -- 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-t...@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: Compress css files with Rails
Marnen Laibow-Koser wrote: > If you use Sass (which I highly, highly recommend) then this is done for > you. You get lots of other advantages too. > > Best, > -- > Marnen Laibow-Koser What is Saas? -- 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-t...@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 use split method?
SushilKarwa wrote: > Thanks for your help. I was not assigning the result of split. > > I know this is simple Ruby question, but I was looking for a quick > help and that' why posted my question in this group. I am not a member > of "Ruby" group. That doesn't make it OK to ask off-topic questions here. > > Thanks agian, > Sushil Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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:
Tom Mac wrote: > Hi >Did not get ny reply. Please help. It is urgent > > Tom Bumping after 5 hours doesn't make people want to help you. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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 kind of Ruby / Erb is allowed inside HAML's :javasc
Jian Lin wrote: > It seems that inside of HAML's :javascript filter, no Ruby code is > allowed, not even a comment. I believe that's correct. But you should never need Ruby within JavaScript, nor should you ever need JavaScript within HTML (it's best to put it in a separate file). > > So this is NOT allowed: > > :javascript > - 1.upto(10) do |i| > > :javascript > -# just a comment not to show to public > > (somebody said there is not way to hide comment like that inside a > :javascript filter. Is that true? Probably. > > but it seems the only thing allowed is > > :javascript > $('#aDiv').html('#{a_ruby_variable}'; > > only this #{ } is allowed. Nothing else that is Ruby is allowed? I'm surprised that #{} works here. If you think you need Ruby in your JS, you've got a design problem. Fix it. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: Compress css files with Rails
Greg Ma wrote: > Is there an option to remove all useless content in the files? such as > comments. If you use Sass (which I highly, highly recommend) then this is done for you. You get lots of other advantages too. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@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: difference between belongs_to and references keyword?
Correction to my previuos message: you can use "belongs_to" and "references" as column types in scaffold (and migrations). They do same thing: add belongs_to association to model. On Jun 4, 9:05 am, Ugis Ozols wrote: > I've written a short example about has_many, belongs_to > -http://gist.github.com/425026 > > has_many, has_one, belongs_to deffinitions goes into model and not in > scaffold. You can use "references" like this: script/generate scaffold > address company:references address:text > > but as I mentioned in this > discussionhttp://railsforum.com/viewtopic.php?id=39325 > (look for andain's posts) I'm running into problems where views are > generated without appended _id. Maybe I'm just doing something wrong > or just not getting it right ... > > Anyway I hope i shed some light on your problem. > > On Jun 4, 2:18 am, Kevin Hastie wrote: > > > Kevin Hastie wrote: > > > I guess what I really want is something like this: > > > class Address< ActiveRecord::Base > > belongs_to :addressable, :polymorphic => true > > end > > > class Business< ActiveRecord::Base > > has_one :address, :as => :addressable > > end > > > class School < ActiveRecord::Base > > has_one :address, :as => :addressable > > end > > > h) I don't suppose there is a way to do that with the scaffold. Is > > there a typical set of scaffold options that would map to this? > > > i) Lastly, I guess I am better off avoiding polymorphism at the > > beginning, huh? I should just be doing a simple mapping... > > -- > > 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-t...@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 embed html to other site
Yudi Soesanto wrote: > Hi, > > Is there an example code to create embed code (from my site) so I can > embed > my html to other site? > > for example, I want to embed my html to other site. Here is the sample > embed > code for example: check this link [http://railstech.com/?p=30] might be helpful -- 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-t...@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: Re: Re: Authlogic Rails 3
it worked for me. just follow the guide (http://github.com/binarylogic/authlogic_example) but in your Gemfile use: gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3' and to generate a session: rails g authlogic:session user_session these should work great -- 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-t...@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:
Hi Did not get ny reply. Please help. It is urgent Tom -- 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-t...@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: undefined method `tab' for radiant
Hey Smit, Seem to be having the same issue myself whilst trying to install the settings extension, can't quite figure out why it's not working as I'm not doing anything different that usual when setting up a radiant app. If anyone else could help shed some light on the situation it would be greatly appreciated. Thanks Rich On May 19, 11:46 am, Smit Shah wrote: > Hi all... > > I am new to radiant cms. I have tried to install blog and liveblog > extensions. But in both cases I got the following error. > > rake aborted!undefinedmethod`tab' for # > > and > > rake aborted!undefinedmethod`tab' for # > > Any idea? I am using radiant 0.8.1 > > 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-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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-t...@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 use split method?
Thanks for your help. I was not assigning the result of split. I know this is simple Ruby question, but I was looking for a quick help and that' why posted my question in this group. I am not a member of "Ruby" group. Thanks agian, Sushil On Jun 3, 5:16 pm, Michael Pavling wrote: > On 3 June 2010 13:09, Sharagoz wrote: > > > On Jun 3, 1:43 pm, SushilKarwa wrote > >> why does it return "75", instead of "1234". > > Because 75 if the character code of the second character in the > > string. > > Correct identification of the problem. > > > Use split with a bang intead (split!) if you wish to change the > > variable itself. > > Incorrect solution (unless you've overloaded Ruby with your own split! > method)http://ruby-doc.org/core/classes/String.html#M000803 -- 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-t...@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 language problem
This is definitely a language issue, both of our code and our database contains Chinese characters. This is my environment: About your application's environment Ruby version 1.9.1 (i386-mingw32) RubyGems version 1.3.5 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version2.3.5 Application root C:/path_to_my_root Environment development Database adapter mysql Database schema version 20100327010640 This is my localhost;3000 after running my ruby server: ArgumentError in HomeController#construction invalid byte sequence in GBK RAILS_ROOT: C:/path_to_my_root Application Trace | Framework Trace | Full Trace C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:43:in `split' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:43:in `source_extract' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:86:in `compute_backtrace' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:11:in `initialize' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template.rb:212:in `new' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template.rb:212:in `rescue in render_template' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template.rb:205:in `render_template' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ base.rb:265:in `render' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ base.rb:352:in `_render_with_layout' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ base.rb:262:in `render' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/base.rb:1250:in `render_for_file' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/base.rb:951:in `render' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/benchmarking.rb:51:in `block in render_with_benchmark' C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/ active_support/core_ext/benchmark.rb:17:in `block in ms' C:/Ruby19/lib/ruby/1.9.1/benchmark.rb:309:in `realtime' C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/ active_support/core_ext/benchmark.rb:17:in `ms' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/benchmarking.rb:51:in `render_with_benchmark' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/mime_responds.rb:135:in `block in custom' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/mime_responds.rb:179:in `call' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/mime_responds.rb:179:in `block in respond' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/mime_responds.rb:173:in `each' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/mime_responds.rb:173:in `respond' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/mime_responds.rb:107:in `respond_to' C:/Users/Howard/Documents/local/vjoin/app/controllers/ home_controller.rb:53:in `construction' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:43:in `split' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:43:in `source_extract' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:86:in `compute_backtrace' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template_error.rb:11:in `initialize' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template.rb:212:in `new' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template.rb:212:in `rescue in render_template' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ template.rb:205:in `render_template' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ base.rb:265:in `render' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ base.rb:352:in `_render_with_layout' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/action_view/ base.rb:262:in `render' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/base.rb:1250:in `render_for_file' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/base.rb:951:in `render' C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/ action_controller/benchmarking.rb:51:in `block in render_with_benchmark' C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/ active_support/core_ext/benchmark.rb:17:in `block in ms' C:/Ruby19/lib/ruby/1.9.1/benchmark.rb:309:in `realtime' C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/ active_support/core_ext/benchmark.rb
[Rails] Password re-check with authlogic
Hi there! I know what I am trying to do would seem laughably easy to some, but pray accept my excuses for still being nothing more than a newbie where rails is concerned. It seems there is so much to learn. And with rails it's always not about doing it, but doing it easily and meaningfully, i.e. I'm asking how to do it the RIGHT way. Now, I am having a very simple User/Session model (implemented using Authlogic). In fact it is so simple, that all the functionality regarding profile editing is put on ONE page. I'd like the user to be able to set some details AND to be able to change their password. In case the user desires to change their password, i.e. does NOT leave the password field blank, they must be required to enter their current password (sounds logical enough to me) in another field. However, there are a couple of problems I am experiencing with this simple scenario. Firstly, how could I tell the User model to forget about the password fields and NOT save them if they are empty (I know how to validate them but that alone doesn't seem to do it) and so Authologic wouldn't complain either? Secondly, is there any way to validate that the entered password in the `password_check` field matches the current one, but do it using custom validation callbacks (i.e. in the model, not in the controller)? I don't see how one could have access to the params hash from within the model validation methods (and it doesn't seems right to me to do so) so should one use virtual attributes to do the check?! Thirdly, even if all that validation was done in the controller (i.e. if it is not possible to be done in the model), does anyone know how I am to compare the entered password and the current one for it is stored in encrypted form. There must be some method in Authologic that should be able to do just that (i.e. not reviling the password, but comparing an entered password against the current one). And finally, is there any way to add errors to an ActiveRecord object from within the controller (not the model) so as to be able to show them along with the other validation errors if I can't make that validation in the model? Thank you awfully much! ...and sorry for the bunch of words but it's incredibly hard to express extremely simple things simply. -- 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-t...@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] Can Rails cache a Controller "as long as code not changed"?
At work, we have a situation where when script/server is run, then all the controller code is cached. This is to speed up the development server. But that will mean that whenever we change the controller code, we need to restart the server. So we can turn off the caching of controller code all together. But can't there be mechanism that is similar to the inclusion of javascript foo.js?1273424325 which is to use the cached version as long as there is no code change, but recompile it when there is code change? Maybe because we use HAML and SASS a lot, loading some page (such as the homepage of the site) can take 40 seconds on the dev environment and it is quite long. -- 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-t...@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 add multi image with paperclip dynamicly
i want add one or many image using paperclip but dynamicly -- 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-t...@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: Scheduled tasks in Rails: Cron + wget = Best solution?
Mutesa wrote: > Hi Tom, > > I am using BackgrounDRb and it does almost all of requirements you've > mentioned. > Check : http://backgroundrb.rubyforge.org/ > > Hope this helps! > > Mutesa Wheneverize gem -- 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-t...@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: Compress css files with Rails
Is there an option to remove all useless content in the files? such as comments. -- 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-t...@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] MysQL and Ruby
Hi, what is necessary to install to use the database MySQL under Aptana (Rubyb 1.8.6) My config: Windows XP PRO SP2 Wamp5 1.7.4 with MysQL 5.0.45 Aptana 2.0.4 RubyGems 1.3.5 Ruby 1.8.6 -- 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-t...@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: Scheduled tasks in Rails: Cron + wget = Best solution?
Hi Tom, I am using BackgrounDRb and it does almost all of requirements you've mentioned. Check : http://backgroundrb.rubyforge.org/ Hope this helps! Mutesa -- 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-t...@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: Compress css files with Rails
Felix Schäfer wrote: > Am 04.06.2010 um 10:37 schrieb Gregory Ma: > >> I work on a website with many css files. To improve the performance of >> the site I would to merge all my css file into one on the production >> site. >> I know I could do this using plugins, but I heard it is possible >> natively within rails. >> >> Does someone know what it is? > > See the :cache => true option of stylesheet_link_tag > http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M002231 > > Felix Thank you very much -- 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-t...@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.