[Rails] Oracle date problems, and how to make alter session work

2009-01-09 Thread michael_teter
Howdy. Something change recently (Oracle upgrade and/or new gem) that's causing ActiveRecord to give me very unfriendly dates from Oracle. I believe the old dates I was getting were -MM-DD. The ones I'm getting now are like this: Tue Dec 23 00:00:00 -0600 2008 Oddly enough, telling my

[Rails] Fixture hash not available on the console in test env?

2009-01-09 Thread Tyler Arrigoni
While the generated id certainly works well for tests, it was previously easier when loading the test console and interacting with your model relationships. Is there an expectation to make the fixture hashes available on the test console? Currently running 2.2.2. -- Posted via

[Rails] Re: partials and comments and other fun things!

2009-01-09 Thread Franz Strebel
On Thu, Jan 8, 2009 at 6:59 PM, Roger Muthton rails-mailing-l...@andreas-s.net wrote: % for message in @messages % %= render :partial = @comment = Comment.new, :locals = { :button_name = 'Post'}% % end % If you have your association setup properly between Message and Comment models, then you

[Rails] Re: Rails Hosting

2009-01-09 Thread jasoo24
For your needs, I would also have to recommend Dreamhost. You can deploy production-ready apps through Capistrano and it is a great and inexpensive Rails sandbox. HOWEVER, Dreamhost is slow to a crawl. It's actually unacceptably slow for any webapp trying to make money.. I'd venture to guess

[Rails] Re: could not find [gem] locally or in a repository

2009-01-09 Thread MaD
i don't work on windows, but nmake can be found here: ftp://ftp.microsoft.com/softlib/mslfiles/nmake15.exe reference: http://msdn.microsoft.com/en-us/library/ms930369.aspx additionally i want to say, that i never used this program and i'm not sure if you really need it, but form your output

[Rails] Re: Oracle date problems, and how to make alter session work

2009-01-09 Thread MaD
you could try putting the following in your environment.rb: ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.update (:default = '%Y-%m-%d') --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: gem update problem

2009-01-09 Thread MaD
after installing rubygems-update, just run sudo update_rubygems --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To

[Rails] Re: could not find [gem] locally or in a repository

2009-01-09 Thread Ss Kk
MaD wrote: i don't work on windows, but nmake can be found here: ftp://ftp.microsoft.com/softlib/mslfiles/nmake15.exe reference: http://msdn.microsoft.com/en-us/library/ms930369.aspx additionally i want to say, that i never used this program and i'm not sure if you really need it,

[Rails] Re: Oracle date problems, and how to make alter session work

2009-01-09 Thread michael_teter
Ok, I've done this, and it works for me mostly... Now I have to figure out why to_xml() is changing the date format to the big ugly version . For example: errs = Errors.find(:all, :conditions = errtype = 2) = [#Errors blah blah blah, crtd: 2009-01-07 00:00:00 ...] errs.to_xml(:dasherize =

[Rails] Re: Oracle date problems, and how to make alter session work

2009-01-09 Thread MaD
a guy in this thread had the same problem and obviously fixed it (scroll down to the end). http://www.ruby-forum.com/topic/57923 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] How can I set selected value on select_tag

2009-01-09 Thread Zhao Yi
This is my select_tag code: %=select_tag 'project_version_select', options_for_select(@project_versions)% How can I set the selected value for this select box? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: Oracle date problems, and how to make alter session work

2009-01-09 Thread michael_teter
Yeah, the specific post is http://www.ruby-forum.com/topic/57923#548266 Unfortunately that's not working for me. I assume I should just be able to do: Hash::XML_FORMATTING['datetime'] = Proc.new { |datetime| datetime.to_s(:rfc822) } errs.to_xml I'm still getting the long date in the XML

[Rails] Re: could not find [gem] locally or in a repository

2009-01-09 Thread Ss Kk
MaD wrote: for your OS to find the programm you need to add it to your path variable. look here (or google for it): http://vlaurie.com/computers2/Articles/environment.htm this should be very easy. when you adjusted your path variable try to invoke nmake from the command line to check if

[Rails] Re: Anyone Recommend a File Uploader

2009-01-09 Thread Peter De Berdt
On 08 Jan 2009, at 18:35, Dave Smith wrote: You are manually assigning related record ids instead of relying on Rails' built-in safeguards. I'd advise u to start looking at railscasts.com, starting for very early ones (complex forms might be a good one for you), getting a Rails book (The

[Rails] Regarding Pay Pal integration..

2009-01-09 Thread Arun Kumar
Hi all. I am new to ror and i want to add pay pal (paying system) option to the site. now i use xp env.. i run the application in Rails version 1.2.6 and Ruby Version 1.8.6. I have the merchant a/c for pay pal My question is which is best 1. gem integration or pay pal plug in integration.

[Rails] Deprecation warning I get but the error is more than that I think

2009-01-09 Thread bearblu
The following code from the RailsSpace book: def correct_error_message(boundary, length) error_messages = ActiveRecord::Errors.default_error_messages if boundary == :max sprintf(error_messages[:too_long], length) elsif boundary == :min sprintf(error_messages[:too_short],

[Rails] ActiveRecord handling of obj.dup vs obj.clone

2009-01-09 Thread daudi
AR seems to be handling model object dup and cloning differently from Ruby documented behavior. I've checked out both ways (as an AR model and not) and the behavior is different. I don't see anything in the RAILS documentation about this. Am I missing something? is this a bug? a feature? an

[Rails] 1 Page website :)

2009-01-09 Thread typemismatch
Is there a way to create what is basically a 1 page website, something that just does a redirect or a single submit form etc. It seems like an entire Rails site with controllers etc is too much. Maybe something with a single .rb page .. who knows :) just learning Rails. thanks -c

[Rails] ActionController::RoutingError (No route matches

2009-01-09 Thread Ruby
Recently we came across the above problem. After digging in for about 1 day we found one solution which I will like to share. This error comes when you are using rails with flex and svn as repository. in this case try to recreate html-template thru flex or delete html-template from your machine

[Rails] Re: Update specific div using post request.

2009-01-09 Thread Nirav Parekh
It is possible to update a specific div using a post request like AJAX do. you need to use link_to_remote method for this. What does this link_to_remote method does... Returns a link to a remote action defined by options[:url] (using the url_for format) that's called in the background using

[Rails] Using yaml_db plugin on windows

2009-01-09 Thread ambarja
Hi, I've tried installing yaml_db on a winxp machine. installation seemed fine: ruby script\plugin install git://github.com/adamwiggins/yaml_db.git- was ok but when i am trying to run rake db:dump i am getting: --8--8--8--8--8--8

[Rails] Re: 1 Page website :)

2009-01-09 Thread MaD
i don't understand what you are looking for. could you be a little more specific. if you just want a single page, why not build a single html-page? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] Re: Regarding Pay Pal integration..

2009-01-09 Thread MaD
lately ryan did a whole series on paypal ror on railscasts. check it out: http://railscasts.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

[Rails] Re: Oracle date problems, and how to make alter session work

2009-01-09 Thread michael_teter
I've found the place where my date/time/datetime is being formatted (I think); however, changing the format isn't having any effect on ActiveRecord::Base.to_xml() activesupport-2.0.2/lib/active_support/core_ext/hash/conversions.rb line 48 I've tried changing at runtime via the method listed in

[Rails] You have a nil object when you didn't expect it!

2009-01-09 Thread Gi Ga
% if @flash[:error] % div id=error%= @flash[:error] %/div % end % % if @flash[:warning] % div id=warning%= @flash[:warning] %/div % end % % if @flash[:notice] % div id=notice%= @flash[:notice] %/div % end % -- You have a nil object when you didn't expect it! You might have

[Rails] Re: 1 Page website :)

2009-01-09 Thread Christoph Jasinski
Rails is not good for 1-site-websites. The framework is too big for that, rendering takes more time than a plain html-file. You would need to have more than one site to have brenefits from rails like layout, DRY etc. But if you still want to learn rails by one-site-websites, checkout

[Rails] Re: You have a nil object when you didn't expect it!

2009-01-09 Thread NAYAK
Hi, Did you see any line number in the error? It would be helpful if you gould give the whole trace rather than just the error message NAYAK On Fri, Jan 9, 2009 at 3:36 PM, Gi Ga rails-mailing-l...@andreas-s.netwrote: % if @flash[:error] % div id=error%= @flash[:error] %/div % end % %

[Rails] Re: You have a nil object when you didn't expect it!

2009-01-09 Thread MaD
How I must do it? could it be, it's flash[:notice] without the @. if not, tell us where your error occurred (which line). then show us the code calling it (controller/action). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] Re: Rails Hosting

2009-01-09 Thread Roderick van Domburg
jasoo24 wrote: I am desperately seeking a super-FAST Rails host that won't cost me an arm-and-a-leg. I will check out all the suggestions mentioned here, but - Does anyone know of a host that would be able to consistently load my [simple] website pages within ~5 seconds? I'm not sure of

[Rails] BlackBook Gem

2009-01-09 Thread Gaurav Sharma
Hi All I am new to BlackBook Gem , and i am really exited to implement this utility in my web application to enable the users of my website to fetch their contacts from the AOL , Yahoo , Gmail etc. My Application is implemented in PHP. So please suggest me how to use blackbook gem with my

[Rails] Re: Oracle date problems, and how to make alter session work

2009-01-09 Thread MaD
i honestly don't know. but still i'm eager to learn. here is something i found on google: [quote] If I were facing this dilemma, I would add a method on the model that returns the date in the format that you need it: def updated_at_js updated_at.strftime(some format) end Then call to_xml

[Rails] Re: BlackBook Gem

2009-01-09 Thread Frederick Cheung
On 9 Jan 2009, at 10:30, Gaurav Sharma wrote: Hi All I am new to BlackBook Gem , and i am really exited to implement this utility in my web application to enable the users of my website to fetch their contacts from the AOL , Yahoo , Gmail etc. My Application is implemented in PHP. So

[Rails] Re: BlackBook Gem

2009-01-09 Thread Gaurav Sharma
Frederick Cheung wrote: On 9 Jan 2009, at 10:30, Gaurav Sharma wrote: Hi All I am new to BlackBook Gem , and i am really exited to implement this utility in my web application to enable the users of my website to fetch their contacts from the AOL , Yahoo , Gmail etc. My Application

[Rails] how can I tell which transaction each SQL call is in?

2009-01-09 Thread Greg Hauptmann
hi, I'm trying to debug some transaction related issues in my code: How could I tell which Sql statement (from logs) which transaction (if any) they are in? Grg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: You have a nil object when you didn't expect it!

2009-01-09 Thread Gi Ga
MaD wrote: could it be, it's flash[:notice] without the @. Thanks, now it works. -- 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

[Rails] Re: Regarding Pay Pal integration..

2009-01-09 Thread Arun Kumar
Thanks for the quick response, I ll follow the link, incase of any doubt i ll back.. On Fri, Jan 9, 2009 at 3:20 PM, MaD mayer.domi...@gmail.com wrote: lately ryan did a whole series on paypal ror on railscasts. check it out: http://railscasts.com/ -- Rejoice *+ o +*

[Rails] Re: Regarding Pay Pal integration..

2009-01-09 Thread Arun Kumar
Thanks for the quick response, I ll follow the link, incase of any doubt i ll back.. On Fri, Jan 9, 2009 at 3:20 PM, MaD mayer.domi...@gmail.com wrote: lately ryan did a whole series on paypal ror on railscasts. check it out: http://railscasts.com/

[Rails] Authorize.Net Gateway using ActiveMerchant

2009-01-09 Thread Kumar Ca
Hi, In my application, I am using Authorize.Net Gateway using ActiveMerchant. I changed the ActiveMerchant::Billing::Base.mode to :production. I am getting successfully transferred message. But actual banking transaction was not done. Please give me solution to this problem. Thanks in

[Rails] Re: gem update problem

2009-01-09 Thread Konstantin
No success :( $ sudo update_rubygems sudo: update_rubygems: command not found $ sudo update-rubygems sudo: update-rubygems: command not found On 9 янв, 11:28, MaD mayer.domi...@gmail.com wrote: after installing rubygems-update, just run sudo update_rubygems

[Rails] has_many :through question.

2009-01-09 Thread Michael Delaney
hi, i'm a newbie working on my first commerical rails project. i've got some models that i'm stuck with, not sure whether i need to redesign the schema's or stick to my earlier design as i can quite get what i want from the way i've implemented my associations. Basically i want to access the

[Rails] Re: gem update problem

2009-01-09 Thread MaD
well, that's odd. gem list should show you rubygems-update (1.3.1) with that there should be the command update_rubygems available. if not check your gem-directory which can be found by running gem environment for me it is /usr/lib/ruby/gems/1.8/gems/rubygems-update-1.3.1/bin/

[Rails] Re: has_many :through question.

2009-01-09 Thread MaD
in your Bed-model add has many :bookings, :through = :booking_items then you should be able to call bookings_for_bed_1 = Bed.find(1).bookings --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] undefined local variable or method `current_user' for

2009-01-09 Thread shahroon ali
Hi All, I am using a Plugin mdarby-restful_acl with restful_authentication and I am following the procedure form http://github.com/mdarby/restful_acl/tree/master , but I am getting some irritating error undefined local variable or method `current_user' for, I know I am missing something

[Rails] Re: undefined local variable or method `current_user' for

2009-01-09 Thread NAYAK
Hi, generally plugins require methods like current_user implemented in application.rb for integration purposes. This method should return an object of the user NAYAK On Fri, Jan 9, 2009 at 6:33 PM, shahroon ali shahroon@gmail.com wrote: Hi All, I am using a Plugin

[Rails] Re: gem update problem

2009-01-09 Thread Konstantin
Ah, I guess the problem is in the paths! I have changed the standard gem command to work by default with Passenger. So, I guess, I should update the Passenger now? Here is an output of your commands: $ gem list -l ... rubygems-update (1.3.1) ... $ gem environment RubyGems Environment: -

[Rails] Re: undefined local variable or method `current_user' for

2009-01-09 Thread shahroon ali
Okay, but could you please explain it in detail, I mean what I have to define in application.rb and how to define? And whats the whole procedure? Thanks in advance Shahroon On Fri, Jan 9, 2009 at 6:04 PM, NAYAK nay...@gmail.com wrote: Hi, generally plugins require methods like current_user

[Rails] Re: Is there any way to let the user edit the stylesheet file?

2009-01-09 Thread Mukund
Try the liquid plugin. Start here. http://wiki.rubyonrails.org/rails/pages/Liquid+Plugin On Jan 9, 11:10 am, Bob Sanders rails-mailing-l...@andreas-s.net wrote: I'm curious how to let the user edit the public/stylesheets/site.css file through views

[Rails] ID and Archiving in Rails

2009-01-09 Thread manohar amrutkar
Hi All, I have created a table record_archives using engine=archive in my application to archive data for a table records. I want to insert data into archived table at specific time, like once in a week. I have created model for that table but not used any migration and directly created a table

[Rails] Re: Installing Ruby on Rails

2009-01-09 Thread Sazima
I agree RoR is hot, but if you are a good developer, you can get a job in 1 month even without learning RoR... Cheers, Sazima On Jan 8, 10:19 pm, crazy canuck b.trepani...@gmail.com wrote: I am completely new to all of this. I was told by a potential employer if I learned Ruby on Rails and

[Rails] Re: ID and Archiving in Rails

2009-01-09 Thread Frederick Cheung
On 9 Jan 2009, at 13:14, manohar amrutkar wrote: Hi All, I have created a table record_archives using engine=archive in my application to archive data for a table records. I want to insert data into archived table at specific time, like once in a week. I have created model for that table

[Rails] Re: gem update problem

2009-01-09 Thread MaD
- GEM PATHS: - /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8 you should find the rubygems-update gem there. just go in, locate the bin-directory and start update_rubygems from there. still, to save yourself some trouble. look into your path-variables and make sure everything is

[Rails] Re: undefined local variable or method `current_user' for

2009-01-09 Thread MaD
that depends on your plugin. did you follow all the instructions in README? what's your complete error-trace? where does the error occurr? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

[Rails] Re: gem update problem

2009-01-09 Thread Sazima
Exactly, check your paths, or link the standard ruby, gem and rails commands to the desired version... Cheers, Sazima On Jan 9, 11:08 am, Konstantin rasf...@gmail.com wrote: Ah, I guess the problem is in the paths! I have changed the standard gem command to work by default with Passenger.

[Rails] Re: Anyone Recommend a File Uploader

2009-01-09 Thread Sazima
attachment_fu, file_column, paperclip (nice railscast) Ifo you need multiple concurrent uploads, go for something in flash... Cheers, Sazima On Jan 7, 12:13 pm, Dave Smith rails-mailing-l...@andreas-s.net wrote: Can anyone recommend a good file upload plugin for uploading standard files

[Rails] Re: Rails 2.2 routing problem

2009-01-09 Thread Michael Rigart
cassiozen wrote: You could try to use formatted_items_path(:pdf) On Jan 7, 6:30�pm, Michael Rigart rails-mailing-l...@andreas-s.net formatted_items_path nor, formatted_item_path seems to work. Both result in a no method error. -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Anyone Recommend a File Uploader

2009-01-09 Thread Dave Smith
Sazima wrote: attachment_fu, file_column, paperclip (nice railscast) Ifo you need multiple concurrent uploads, go for something in flash... Cheers, Sazima On Jan 7, 12:13�pm, Dave Smith rails-mailing-l...@andreas-s.net thank you all for your help! its greatly appreciated! ive gone with

[Rails] Re: 1 Page website :)

2009-01-09 Thread Sazima
If you don't want to use Active Record (database), just configure environment.rb to exclude it. Generate (scaffold) 1 controller and fill in the actions / views as you like. Cheers, SAzima On Jan 9, 1:04 am, typemismatch craigw9...@gmail.com wrote: Is there a way to create what is basically a

[Rails] Re: BlackBook Gem

2009-01-09 Thread Sazima
Gaurav, You can have rails and PHP co-existing in the same server, but you would have to glue the applications together... You cannout use the gem directly in your PHP application. Cheers, Sazima On Jan 9, 8:46 am, Gaurav Sharma rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote:

[Rails] Re: undefined local variable or method `current_user' for

2009-01-09 Thread MaD
another one: did you install the restful_athentication plugin first? http://techno-weenie.net/2006/8/1/restful-authentication-plugin even if you installed the mdarby-restful_acl gem or plugin you'll need the restful_authentication-plugin anyways.

[Rails] Re: ID and Archiving in Rails

2009-01-09 Thread manohar amrutkar
Thanks Frederick Cheung !!! On Jan 9, 6:49 pm, Frederick Cheung frederick.che...@gmail.com wrote: On 9 Jan 2009, at 13:14, manohar amrutkar wrote: Hi All, I have created a table record_archives using engine=archive in my application to archive data for a table records. I want to

[Rails] Re: Oracle date problems, and how to make alter session work

2009-01-09 Thread michael_teter
So if I do this: class Errors ActiveRecord::Base def crtd_x crtd.strftime(%Y-%m-%d) end ... end errs = Errors.find(:all, :conditions = ...) errs.to_xml(:methods = [:crtd_x, ...]) It fails with a NoMethodError: You have a nil object when you didn't expect it! The error

[Rails] Re: undefined local variable or method `current_user' for

2009-01-09 Thread shahroon ali
No problem at all, in fact you are helping me a lot.Well I have installed my gem mdarby-restful_acl and its installation was completed successfully. And I have downloaded the auhthentication_acl as well and I think its installation had some problems and I just put that whole plugin directly into

[Rails] Re: partials and comments and other fun things!

2009-01-09 Thread Roger Muthton
Franz Strebel wrote: On Thu, Jan 8, 2009 at 6:59 PM, Roger Muthton rails-mailing-l...@andreas-s.net wrote: % for message in @messages % %= render :partial = @comment = Comment.new, :locals = { :button_name = 'Post'}% % end % If you have your association setup properly between Message and

[Rails] Re: undefined local variable or method `current_user' for

2009-01-09 Thread MaD
And I have downloaded the auhthentication_acl as well and I think its installation had some problems and I just put that whole plugin directly into my vendor/plugin folder. what do you mean by some problems? the current_user-functionality is provided by restful_authentication-plugin. if there

[Rails] Re: partials and comments and other fun things!

2009-01-09 Thread Franz Strebel
On Fri, Jan 9, 2009 at 3:37 PM, Roger Muthton rails-mailing-l...@andreas-s.net wrote: relationships are in my models already and it still is not putting the id value in the database. message has_many :comments comment belongs_to :message Can you try this in your console? m =

[Rails] has_many :through association

2009-01-09 Thread jeljer te Wies
Hee people, I have the following problem: I have the following tables: groups: t.string :title rights: t.integer :group_id t.integer :menu_id t.boolean :see t.boolean :edit menus: t.string :title when you create a group you should get a list of menu items

[Rails] Re: has_many :through association

2009-01-09 Thread jeljer te Wies
To make it a bit more clear: in my form (for edit and new) I have the following: % for menu in Menu.find(:all) % tr td%= check_box_tag group[menu_ids][], menu.id, @group.menus.include?(menu) %/td td%= menu.title %/td /tr % end % But this is not for what i would like ! (if it is

[Rails] Re: How could I uninstall the build-in gems in Leopard

2009-01-09 Thread Michael
It works!! Thanks :) On Nov 18 2008, 2:23 am, Brian Hogan bpho...@gmail.com wrote: On our setups, we simply use the built-in mac stuff and then update the old versions. gem update --system gem install rails You can safely ignore the old versions without a problem. On Mon, Nov 17, 2008

[Rails] Additional config file like database.yml

2009-01-09 Thread Peter Hickman
I have a web site that accesses Solr (a Lucene based search engine accessed via REST). I would like the configuration to be handled in the same was as database.yml. I envision a file called solr.yml that looks something like this in the config directory: development: url:

[Rails] Re: partials and comments and other fun things!

2009-01-09 Thread Roger Muthton
Can you try this in your console? m = Message.find(:first) c = m.comments.new That should automatically set c.message_id to m.id to make the association. Franz yep that works spot on. -- Posted via http://www.ruby-forum.com/.

[Rails] Re: undefined local variable or method `current_user' for

2009-01-09 Thread shahroon ali
Yeah I checked it was installed properly, there was no error in installing it, i was just mistaken. On Fri, Jan 9, 2009 at 7:42 PM, MaD mayer.domi...@gmail.com wrote: And I have downloaded the auhthentication_acl as well and I think its installation had some problems and I just put that

[Rails] Re: Plugin not found: [acts_as_list]

2009-01-09 Thread Mitch Mitch
The way to install it from scratch is (on Win): - cd into the rails_app/vendor/plugins dir - git clone git://github.com/rails/acts_as_list.git -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: How can I prevent ENTER from submitting form?

2009-01-09 Thread Adam Massive
Ok ok, stop.. just stop... you're all making it too complicated. [shakes head] Let's go over things... You want a button that submits normally but want to try and stop the enter key submitting it. To do this, you're going to need to understand the relationship between the ENTER key, the

[Rails] Re: How can I set selected value on select_tag

2009-01-09 Thread Patrick Doyle
On Fri, Jan 9, 2009 at 4:04 AM, Zhao Yi rails-mailing-l...@andreas-s.netwrote: This is my select_tag code: %=select_tag 'project_version_select', options_for_select(@project_versions)% How can I set the selected value for this select box? Look at the documentation for #options_for_select

[Rails] Problem in following Ruby 'Blog' Screencast

2009-01-09 Thread Michael
Hi all, When attempting to follow the screencast, 'Creating a weblog in 15 minutes with Rails 2', I've hit a problem when creating the 'partial'. As soon as the index.html.erb, h1Listing posts/h1 %= render :partial = @posts % %= link_to 'New post', new_post_path % with _post.html.erb. %

[Rails] Capturing system console information

2009-01-09 Thread Ryan Mckenzie
Hello, I have a simple web application that executes a .exe program through my controller. The exe program processes some information and displays an output on the script/server output. Is it possible to catch this information from the console and output it back to the user? I have tried the

[Rails] Re: Problem in following Ruby 'Blog' Screencast

2009-01-09 Thread Bobnation
Take the div out of there ... that looks odd there. Just looking over it, that looks like the problem (maybe). However, I haven't watched the new screencast ... so I can't really tell you. On Jan 9, 9:54 am, Michael bsodm...@gmail.com wrote: Hi all, When attempting to follow the screencast,

[Rails] Re: Capturing system console information

2009-01-09 Thread Matt Harrison
Ryan Mckenzie wrote: Hello, I have a simple web application that executes a .exe program through my controller. The exe program processes some information and displays an output on the script/server output. Is it possible to catch this information from the console and output it back to

[Rails] Re: Problem in following Ruby 'Blog' Screencast

2009-01-09 Thread Matt Harrison
Bobnation wrote: Take the div out of there ... that looks odd there. Certainly does. Just looking over it, that looks like the problem (maybe). However, I haven't watched the new screencast ... so I can't really tell you. Also shouldn't it be for post in @posts do ... end Unless

[Rails] Re: 1 Page website :)

2009-01-09 Thread Bobnation
On Jan 8, 9:04 pm, typemismatch craigw9...@gmail.com wrote: Is there a way to create what is basically a 1 page website, something that just does a redirect or a single submit form etc. It seems like an entire Rails site with controllers etc is too much. Maybe something with a single .rb

[Rails] is activeresource really slow for find with :conditions ?

2009-01-09 Thread wbsurf...@yahoo.com
I have a DRb process on another machine that communicates with the server. It seems like if I do a find() where I specify a :condition through Act-res it will take very long time and most finds of this sort seem like they may send over all of the records in XML. What I ended up doing for know

[Rails] Re: Capturing system console information

2009-01-09 Thread Ryan Mckenzie
Matt Harrison wrote: Ryan Mckenzie wrote: Regards, McKenzie. Perhaps the backtick method would work better? I found that system() calls sometimes returned random data at the end of the result. output = `/path/to/app/to/execute` puts output worked a lot better for my case. HTH

[Rails] Re: Additional config file like database.yml

2009-01-09 Thread scott
you could code it yourself, i think there is a railscast that shows an easy way to do it. or you could use one of the many plugins or gems out there. i just recently used http://github.com/binarylogic/settingslogic/tree/master On Jan 9, 9:32 am, Peter Hickman pete...@ntlworld.com wrote: I have

[Rails] Re: 1 Page website :)

2009-01-09 Thread David Rose
I find that Sinatra is great for small web apps like simple database-backed forms or form mailers, or simple web services. http://github.com/bmizerany/sinatra/tree/master doppler On Thu, Jan 8, 2009 at 9:04 PM, typemismatch craigw9...@gmail.com wrote: Is there a way to create what is

[Rails] Confused about to_xml() in ActiveRecord::Base subclass

2009-01-09 Thread michael_teter
Since all my efforts to control how to_xml() is formatting dates has failed, I'm now considering writing my own to_xml(). However, from the limited examples I've found, I just don't understand how to actually reference the columns for the records in my record set. Here's a simplified view of my

[Rails] Re: Additional config file like database.yml

2009-01-09 Thread Harold
You can do solr_conf = open('path/to/solr.yml', 'r') { |f| YAML.load(f) } solr_conf now holds a hash with your parameteres. You can access it simply by doing something like: url = solr_conf[RAILS_ENV][:url] On Jan 9, 11:33 am, scott scot...@gmail.com wrote: you could code it yourself, i

[Rails] Re: Installing Ruby on Rails

2009-01-09 Thread crazy canuck
I am using CentOS and if possible it would be appreciated to have links to PostgreSQL as well, thanks. thank you for all of your input. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

[Rails] Re: Additional config file like database.yml

2009-01-09 Thread Jodi Showers
Peter On 9-Jan-09, at 11:44 AM, Harold wrote: You can do solr_conf = open('path/to/solr.yml', 'r') { |f| YAML.load(f) } solr_conf now holds a hash with your parameteres. You can access it simply by doing something like: url = solr_conf[RAILS_ENV][:url] On Jan 9, 11:33 am, scott

[Rails] Re: Additional config file like database.yml

2009-01-09 Thread Robert Walker
Scott Nj wrote: you could code it yourself, i think there is a railscast that shows an easy way to do it. or you could use one of the many plugins or gems out there. i just recently used http://github.com/binarylogic/settingslogic/tree/master Yes, I believe there is a railscast on showing

[Rails] Re: Additional config file like database.yml

2009-01-09 Thread Peter Hickman
Thanks to everyone who replied. The railscast is just what I wanted. Thanks to you all again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Confused about to_xml() in ActiveRecord::Base subclass

2009-01-09 Thread Rob Biedenharn
On Jan 9, 2009, at 11:42 AM, michael_teter wrote: Since all my efforts to control how to_xml() is formatting dates has failed, I'm now considering writing my own to_xml(). However, from the limited examples I've found, I just don't understand how to actually reference the columns for the

[Rails] Re: how can I tell which transaction each SQL call is in?

2009-01-09 Thread AD
you should use query_trace plugin. Adam On Fri, Jan 9, 2009 at 6:20 AM, Greg Hauptmann greg.hauptmann.r...@gmail.com wrote: hi, I'm trying to debug some transaction related issues in my code: How could I tell which Sql statement (from logs) which transaction (if any) they are in? Grg

[Rails] Problem starting rails 2.2.2 - rails/plugin/locator.rb

2009-01-09 Thread Max Williams
hey all We're planning an upgrade to rails 2.2.2 and i have a branch for this purpose. A guy on our team who set the branch up can run it fine, but i have this problem when i try to start mongrel. /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:96:in `add': wrong number of

[Rails] Re: Problem starting rails 2.2.2 - rails/plugin/locator.rb

2009-01-09 Thread Frederick Cheung
On 9 Jan 2009, at 17:35, Max Williams wrote: hey all We're planning an upgrade to rails 2.2.2 and i have a branch for this purpose. A guy on our team who set the branch up can run it fine, but i have this problem when i try to start mongrel. version of rubygems ? rails 2.2.2 requires

[Rails] Re: gem update problem

2009-01-09 Thread Konstantin
It's very strange, but I still cannot force the update_rubygems to run correctly. I have tried the full path, but failed: $ sudo /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/ rubygems-update-1.3.1/bin/update_rubygems Error: Cannot find RubyGems Update Path! RubyGems has already

[Rails] Re: Confused about to_xml() in ActiveRecord::Base subclass

2009-01-09 Thread michael_teter
Rob, Thanks much for the good response. To answer your question about the data type, it's date in Oracle. When I use the default to_xml() (without suppressing types and the dasherizer) it looks like this: error-date type=\ActiveRecord::ConnectionAdapters::OracleColumn \Wed Nov 12 00:00:00 -0600

[Rails] Re: 1 Page website :)

2009-01-09 Thread Freddy Andersen
Redirect? How about just apache? index.html is a start... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To

[Rails] Re: Problem starting rails 2.2.2 - rails/plugin/locator.rb

2009-01-09 Thread Max Williams
Frederick Cheung wrote: On 9 Jan 2009, at 17:35, Max Williams wrote: hey all We're planning an upgrade to rails 2.2.2 and i have a branch for this purpose. A guy on our team who set the branch up can run it fine, but i have this problem when i try to start mongrel. version of

[Rails] Re: has_many :through question.

2009-01-09 Thread Michael Delaney
Hi, I added that and could get the bookings for a bed. but i wanted to get the bookings for a room using an association like: room.bookings i tried adding this using the nested has many plugin: has_many :bookings, :through = :booking_items to Room. but i got this error message.

[Rails] Help figuring out problem with installing activesupport 2.2.2

2009-01-09 Thread LRaiz
I created a brand new RoR installation on Win XP using InstantRails-2.0 which brought rails 2.0.2. I now struggle to update it to rails 2.2.2. The essence of my problem comes to the installation of activesupport 2.2.2. Below is the cut and pasted session illustrating my problem and run-time

  1   2   >