similar to: Getting error while running typo......

Displaying 20 results from an estimated 8000 matches similar to: "Getting error while running typo......"

2006 Jun 08
5
How to find particular pattern in string?
Hi, In my application I want to find out the occurance of substring "http:\\" in the main string "http:\\www.abc.com" Here how to find out whether substring "http:\\" is present in my String? & if substring "http:\\" is present then I want to delete it from main string. How to do this? PLs help me. Thanx in advance. Prash -- Posted via
2006 Mar 17
3
How to check for presence of particular value entered ?
Hi, I am entering value in textbox ("name") on form. Now name field in database is having ''unique'' constraint on it so that no 2 records with same name allowed in database. Now when I m trying to enter same name into database from my form I m getting following error. ================================ Mysql::Error: #23000Duplicate entry ''Prashant''
2006 May 08
7
How to get difference between two dates in days???
Hi, I want to calculate difference between Current date & previous date (stored in database). The difference should be in days. Hhow to do that?? PLs tell me. Thanx in advance. Prash -- Posted via http://www.ruby-forum.com/.
2006 Jun 06
4
pls help me regarding Maths round up function.....
Hi, I have some values on my webpage displaying like 1.22333333333 2.33333344444 2.33377777777 etc. Here I want to display values upto 2 decimal places correct. i.e, 1.22333333333 should be dislayed as 1.22 2.33333344444 should be dislayed as 2.33 2.33777777777 should be dislayed as 2.34 & so on.... How to do this in ruby????? Is there any function??? Thanx in advance. Prash --
2006 Mar 14
3
Can anybody tell me step by step how validate data on form?
Hi, I am new to ROR. I have created a form with foru fields in ROR. Now its working fine for all CRUD operations. But I want to validate data on form for "validates_presence_of" validation. How to do this? I tried it by putting line "validates_presence_of :description" . But its not working. Its throws error like "undefined method `each'' for
2006 Mar 14
6
How to provide 2 actions to a form?
Hi, I have a form in rhtml. Now I have 2 buttons indside that form. Clicking on the first button action will be ''create'' & on second button action will be ''delete''. How to do this? Thanx Prash -- Posted via http://www.ruby-forum.com/.
2006 Mar 17
2
How to specify default action for particulr actioncontroller
HI, How to specify default action for particular actioncontroller? Currently when I m typing the URL as "http:\\localhost:3000\actioncontroller_name" , then I m getting the default actin page as list.rHtml. But instead I want my action page to be index.rHtml. How to do it? Thanx. Prash -- Posted via http://www.ruby-forum.com/.
2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not having i18n installed. Either bundler should be installing i18n along with activesupport or docs need to be updated. quick repro: https://github.com/softwaregravy/repro_active_support_i18n bundle exec irb require ''active_support/all'' detailed steps and error: 1) add to Gemfile require
2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not having i18n installed. Either bundler should be installing i18n along with activesupport or docs need to be updated. quick repro: https://github.com/softwaregravy/repro_active_support_i18n bundle exec irb require ''active_support/all'' detailed steps and error: 1) add to Gemfile require
2005 May 22
1
ActiveRecord: can not connect to mysql
Hi I would like to write my first application with Active Record: this is my database table: id PRIMAREY KEY auto_increment german_name varchar(50) english_name varchar(50) | wingspan this is my code: ======================= #!/usr/local/bin/ruby -w require ''rubygems'' require_gem ''activerecord'', ">= 1.10.1"
2005 Mar 15
0
0.10.0, Routes and Query strings
So I made the leap to 0.10.0 but I can not get routes to play nice with query strings... I have this mapping in my routes.rb file map.connect '':controller/:action/:id'', :controller => ''main_controller'' This is all cool and everything works fine http://www.siteroot.com/ maps to http://www.siteroot.com/main_controller/index But when I add a query string to
2006 Apr 05
6
How to Upload Image through RoR??
Hi, I have one form , in which I am using file_field teg for input image file as follows. ===== <%= file_field("store", "picture") %> ======= Tha Actual fileld name of my Image field in Database is "store_photo" with datatype LargeBLOB. & Inside my Store Model I have specified "def picture" as follows:- ========================= def
2009 May 10
3
Ruby 1.9 problem
What wrong: # rails test /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/core_ext/uri.rb:8:in `<top (required)>'': uninitialized constant URI::Parser (NameError) from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/core_ext.rb:3:in `require'' from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/core_ext.rb:3:in `block in
2006 May 12
2
Problem regarding accessing attributes from object...
Hi, I have an object (@cnt). Now when I am calling "@cnt.inspect" on object it gives me output as follows:- ----output---- [#"3"}>] ----------- Now in aboove output the number between double quotes (3) which is of my interest & I want to display it. How to do that? Actually this is my method:- ==================================== class Tagging < ActiveRecord::Base
2006 Jan 09
1
Cooky Cookies
Hi All, I have a problem with the stemming(?) in rails. I have a table cookie and a Cookie model which I have generated a scaffold for. The problem is that rails starts looking for a file that it calls "cooky.rb", this must be some kind of misunderstanding between me and rails, but how do I correct it? Other scaffolds work just fine. /Hugo NameError in Cookie#index uninitialized
2005 Dec 21
1
Table called applications - causes stack overflow?
Having worked through Four Days on Rails and the book Agile Web Development with Rails I decided it was time to start a live project. I have an existing application with MySQL database, so I modified the schema to use Rails standard column names. The main table was named ''applications''. ruby script/generate scaffold Application Admin results a stack overflow
2006 Jan 10
1
Cooky cookies causes trouble
Hi All, Yesterday wrote about my troubles with naming a table and model cookies and cookie respectively. I know that everybody hates the newbie screaming bug as soon as he encounters behaviour he doesn''t understand. But I''ve reproduced the error in the simplest application possible, and dare therefore say that this quite possible could be a bug in Rails. Database: CREATE TABLE
2005 Jul 07
3
NameError Exception
Ruby/Rails n00b here so go easy on me... I''ve been wracking my brain trying to figure out what is wrong here. I''ve checked all my models for the appropriate belongs_to, has_many, etc. I''ve checked to make sure I''m using singular and plurals in the right spot. I''ve checked my syntax around all my "within"''s and nothing seems to fix
2009 Apr 30
1
error with test:functionals
Hello there, I working on my tests but I getting this strange errror: I can see on the database that the object was created but I still got an failure on my test. this is my test code: test "should create artist" do assert_difference(''Artist.count'', difference = 1) do post :create, :artist => { } end assert_redirected_to
2006 Mar 24
2
How to use Readymade plugins?????
Hi, I have downloaded "Ruby on Rails validator plugin for password fields". & they have specified that for using it we have to unzip it in plugins directory of your rails application. But I cant find the plugin directory in my Rails Application. Also there is plugin directory in Rails server installation directory:-"C:\local\ruby\freeride\plugins\". & so I have