Search the web
Sign In
New User? Sign Up
RubyOnRails · Ruby on Rails
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 77 - 106 of 107   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#106 From: "Nic" <nic.oosthuizen1@...>
Date: Mon Oct 5, 2009 9:44 am
Subject: New to Ruby
nic.oosthuizen1
Offline Offline
Send Email Send Email
 
Hi,

I am new (very new) to ruby. I have ASP (vb script), and JavaScript experience
and now I am starting with Ruby. I have gone thru some training materials and
find the language simple enough, but I am still confused.

Basic question, I have a HTML page and want to execute ruby scripts in this
page. Am I missing the plot, or is this possible. Can somebdy maybe give me a
full sample of such code???
Nic

#105 From: "Manjunath" <manjumn@...>
Date: Wed Jan 21, 2009 5:59 am
Subject: Performance testing
manjumn
Offline Offline
Send Email Send Email
 
Hi everyone,
I am using ruby on rails as a functional testing tool for my we
applications and it is awsome. I like to know if there is a way to find
the performace of my application using this tool or any other tool
other then load runner

#104 From: "Bruno Siqueira" <bruno_sil@...>
Date: Tue Sep 16, 2008 4:52 pm
Subject: intercepting render
bruno_sil
Offline Offline
Send Email Send Email
 
Hello, guys.
In my app I need to render a page in an action and them, intercept it in the
after_filter and maybe change it. Is that possible without getting a double
render error?
thanks
Bruno


[Non-text portions of this message have been removed]

#103 From: Dave Ekhaus <dekhaus@...>
Date: Tue Jul 8, 2008 5:35 am
Subject: Ajax and browser 'back' button issues
dekhaus
Offline Offline
Send Email Send Email
 
Hi

	 I'm trying to find a solution to what I would describe as
inconsistent state of session objects updated from multiple pages
using Ajax techniques.

	 A concrete example would help.

	 The 'Agile Web Development with Rails' book includes the development
of a sample application called the Depot application.  Its a shopping
application - where the user shops for books, places them in a
'cart', and ultimately 'checks out'.

	 The Depot application has a page where you can see all the available
books - along the left-nav there's also a summary of the users
'cart'.  Every time a user adds a book to their cart - the left-nav
summary is updated accordingly.   In addition - assume there's a link
on this page - let's call it the 'shopping' page, that allows a user
to go to another page and edit the contents of their cart - let's
call that page the 'edit cart' page.

	 Imagine a user has added 4 books on the 'shopping' page, then they
go to the 'edit cart' page and delete all the items from their cart -
books are removed from the 'cart object' every time the user deletes
a book from their cart.  The cart object is stored in the session.
They then hit the browser's 'back' button - taking them back to the
'shopping' page - which shows the cart containing 4 books in the left-
nav summary - the same books that were in the cart when the user
initially left the 'shopping' page.  If the user refreshes the
'shopping' page - the cart is now empty, correctly reflecting the
contents of the cart.

	 I found what appears to be a solution that works 'sometimes'.  I
don't mean to be imprecise - but it literally works sometimes in
production mode and sometimes not.   I have no idea why.

	 The fix can be explained here ...

		 http://giantrobots.thoughtbot.com/2008/4/25/pitfalls-in-restful-
wizards

	 and amounts to adding a 'filter' which calls a private 'no_cache'
method defined in application.rb ...

    def no_cache
      response.headers["Last-Modified"] = Time.now.httpdate
      response.headers["Expires"] = 0

      # HTTP 1.0
      response.headers["Pragma"] = "no-cache"

      # HTTP 1.1 'pre-check=0, post-check=0' (IE specific)
      response.headers["Cache-Control"] = 'no-store, no-cache, must-
revalidate, max-age=0, pre-check=0, post-check=0'
    end


	 I then added the following line to the controller/actions that I
want to not be cached ...

		 after_filter :no_cache, :only => [:index]

	 Note: the link I included above uses a 'before' filter, and in my
testing that didn't seem to work - but an 'after' filter did.

	 Now - like I said above, it works sometimes, other times not.  So my
question - does anyone know why ?

	 Additionally - is there a reliable browser agnostic fix that can
address the underlying issue - specifically, force pages that users
return to when hitting the browse button to not be cached and
actually request the page from the server?

	 Any help would be greatly appreciated.  Thanks for making it this
far and sorry for the length of the post.

Dave

#102 From: "Jeronimo" <jeronimo@...>
Date: Mon Jul 7, 2008 11:15 pm
Subject: Questions about Rails 1.2.X versus 2.X.Y
jeronimohome
Offline Offline
Send Email Send Email
 
Hello,

Last year, I began my studies of RoR by "Agile Web Development
with Rails" (the classic..) when It was in its first edition.
At that time, I've developed a Rails application, with version 1.2.X
(I do not remember the exact version).
Well, after spending a period away from Rails, I see that we have
already the version 2.x.y, but I'm in trouble with simple things that I
did in the previous version.
For example, when I create a table in mysql (via mysql client,
phpmyadmin, or any other), it was enough to make the "magic" of
"create scaffold" and voilà! The scaffold was ready.
Now, I've downloaded the version 2 of Rails, and I was making the same
thing. When I created the scaffold, voilà! The disappointment... In
the scaffold was no one of the fields form the table ... I've
searched, and understood that the version 2 do not do this by itself,
but I must inform in the command the fields of the table and its
types; moreover, I understood that the db should be created by rake,
and not by a "normal" client for mysql.
Perhaps I am wrong, but this make me think that we have no more the
"automagic" thing, but we are going in the way of any other
framework or library, as Hibernate, for example: to specify manually
to the framework the structure of the database, and perhaps worse:
having to create the database through the framework, and not through
"normal" clents. Besides it appears that there is no "trusted" book to
the new version, as the third version of "Agile Web Dev .." was not
released (yet).
Someone else had this impression?
Is there a good tutorial or official site (in Portuguese or English)
that explain the differences between the versions?
My impressions are real? There is reason for real disappointment?

Regards.

#101 From: Bruno Siqueira <bruno_sil@...>
Date: Tue Jul 1, 2008 1:57 am
Subject: Res: Re: RCOV
bruno_sil
Offline Offline
Send Email Send Email
 
I fixed it. Turns out the all I had to do was update rcov to a newer version.
thanks


----- Mensagem original ----
De: BruceBLeRoy <brucebleroy@...>
Para: RubyOnRails@yahoogroups.com
Enviadas: Domingo, 29 de Junho de 2008 17:46:58
Assunto: [RubyOnRails] Re: RCOV


check out:

http://blog. codahale. com/2006/ 05/26/rails- plugin-rails_ rcov/

--- In RubyOnRails@ yahoogroups. com, "Bruno" <bruno_sil@. ..> wrote:
>
> Hello,
> i just installed the rcov plugin for my rails application and when i
> run the unit tests i get this error:
>
>  rake test:units:rcov
>
> 27 tests, 49 assertions, 0 failures, 0 errors
> c:/ruby/lib/ ruby/1.8/ rexml/document. rb:186:in `write': undefined
local
> variable
> or method `transitive' for <UNDEFINED> ... </>:REXML::Document
(NameError)
>         from (eval):93:in `pretty'
>         from c:/ruby/lib/ ruby/site_ ruby/1.8/ rcov/report. rb:761:in
> `format_overvi
> ew'
>         from c:/ruby/lib/ ruby/site_ ruby/1.8/ rcov/report. rb:796:in
> `create_index'
>
>         from (eval):104:in `create'
>         from (eval):80:in `tracking_additions '
>         from (eval):103:in `create'
>         from (eval):372:in `x_'
>         from c:/ruby/lib/ ruby/site_ ruby/1.8/ rcov/report. rb:796:in
> `create_index'
>
>          ... 22 levels...
>         from c:/ruby/lib/ ruby/site_ ruby/1.8/ rcov.rb:640: in `each'
>         from c:/ruby/lib/ ruby/site_ ruby/1.8/ rcov.rb:640: in
> `dump_coverage_ info'
>         from c:/ruby/bin/ rcov:421
>         from c:/ruby/lib/ ruby/1.8/ test/unit. rb:278
> rake aborted!
> Command failed with status (1): [rcov.cmd -o "C:/Users/Bruno
> Siqueira/Docum. ..]
>
> any clues?
> Bruno
>




       Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua
cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses

[Non-text portions of this message have been removed]

#100 From: "BruceBLeRoy" <brucebleroy@...>
Date: Sun Jun 29, 2008 8:46 pm
Subject: Re: RCOV
brucebleroy
Offline Offline
Send Email Send Email
 
check out:


http://blog.codahale.com/2006/05/26/rails-plugin-rails_rcov/



--- In RubyOnRails@yahoogroups.com, "Bruno" <bruno_sil@...> wrote:
>
> Hello,
> i just installed the rcov plugin for my rails application and when i
> run the unit tests i get this error:
>
>  rake test:units:rcov
>
> 27 tests, 49 assertions, 0 failures, 0 errors
> c:/ruby/lib/ruby/1.8/rexml/document.rb:186:in `write': undefined
local
> variable
> or method `transitive' for <UNDEFINED> ... </>:REXML::Document
(NameError)
>         from (eval):93:in `pretty'
>         from c:/ruby/lib/ruby/site_ruby/1.8/rcov/report.rb:761:in
> `format_overvi
> ew'
>         from c:/ruby/lib/ruby/site_ruby/1.8/rcov/report.rb:796:in
> `create_index'
>
>         from (eval):104:in `create'
>         from (eval):80:in `tracking_additions'
>         from (eval):103:in `create'
>         from (eval):372:in `x_'
>         from c:/ruby/lib/ruby/site_ruby/1.8/rcov/report.rb:796:in
> `create_index'
>
>          ... 22 levels...
>         from c:/ruby/lib/ruby/site_ruby/1.8/rcov.rb:640:in `each'
>         from c:/ruby/lib/ruby/site_ruby/1.8/rcov.rb:640:in
> `dump_coverage_info'
>         from c:/ruby/bin/rcov:421
>         from c:/ruby/lib/ruby/1.8/test/unit.rb:278
> rake aborted!
> Command failed with status (1): [rcov.cmd -o "C:/Users/Bruno
> Siqueira/Docum...]
>
> any clues?
> Bruno
>

#99 From: "Bruno" <bruno_sil@...>
Date: Sat Jun 28, 2008 2:15 pm
Subject: RCOV
bruno_sil
Offline Offline
Send Email Send Email
 
Hello,
i just installed the rcov plugin for my rails application and when i
run the unit tests i get this error:

  rake test:units:rcov

27 tests, 49 assertions, 0 failures, 0 errors
c:/ruby/lib/ruby/1.8/rexml/document.rb:186:in `write': undefined local
variable
or method `transitive' for <UNDEFINED> ... </>:REXML::Document (NameError)
         from (eval):93:in `pretty'
         from c:/ruby/lib/ruby/site_ruby/1.8/rcov/report.rb:761:in
`format_overvi
ew'
         from c:/ruby/lib/ruby/site_ruby/1.8/rcov/report.rb:796:in
`create_index'

         from (eval):104:in `create'
         from (eval):80:in `tracking_additions'
         from (eval):103:in `create'
         from (eval):372:in `x_'
         from c:/ruby/lib/ruby/site_ruby/1.8/rcov/report.rb:796:in
`create_index'

          ... 22 levels...
         from c:/ruby/lib/ruby/site_ruby/1.8/rcov.rb:640:in `each'
         from c:/ruby/lib/ruby/site_ruby/1.8/rcov.rb:640:in
`dump_coverage_info'
         from c:/ruby/bin/rcov:421
         from c:/ruby/lib/ruby/1.8/test/unit.rb:278
rake aborted!
Command failed with status (1): [rcov.cmd -o "C:/Users/Bruno
Siqueira/Docum...]

any clues?
Bruno

#98 From: "Bruno" <bruno_sil@...>
Date: Sat Jun 21, 2008 3:46 pm
Subject: Overriding Base.new
bruno_sil
Offline Offline
Send Email Send Email
 
Hello, I'm new in rails and I'm developing an application using it.
In one of my model classes I need to set an initial status when I
instantiate it. I override the new method like that:

   def Iteration.new
     super(:status => 'Não Iniciada')
   end

but when in some tests I call the new method passing arguments, It
creates this error:
@iteration = Iteration.new(params[:iteration])

Error message:
test_save_failure(IterationsControllerTest):
ArgumentError: wrong number of arguments(1 for 0)

How can I override one method without ruby tring to override all of then?
Can anybody help me?
Thanks

#97 From: "Jody" <perez.jody@...>
Date: Wed Jun 4, 2008 11:57 pm
Subject: New Los Angeles Ruby Group - LARuby - Inaugural Meeting 6/19/08
perez.jody
Offline Offline
Send Email Send Email
 
Announcing the Inaugural meeting for LARuby – the new, local Ruby on
Rails user group!

LARuby is a new user group created by several passionate Ruby on
Rails developers in the local area in response to Southern
California's quickly growing RoR community. Our goal is for it to
quickly become one of the larger group dedicated to Ruby on Rails -
so join now!

WHEN
Thursday, June 19th, 2008 at 7:00 PM

WHERE
LA Times Interactive
5th Floor, The Salon
202 West First St.
Los Angeles, CA 90012

WHO SHOULD COME
Anyone interested in networking or learning or talking about Ruby on
Rails.

WHY
Meet other RoR developers like yourself, network, get some incredible
insights, have some hearty discussions and eat some delicious food -
we've got it all!

EXPECTED ATTENDEES
30 people and counting – RSVP now!

ORGANIZED BY
LA Times Interactive (but we are looking to alternate hosts/locations
for every meeting so let us know if you are interested in hosting our
next meeting!

MEETING TOPIC
"The Inaugural LARuby Meeting/Post RailsConf Discussion"

Food & beverages will be provided

To join LARuby, please go to:  http://groups.yahoo.com/group/LARuby

#96 From: sathya narayanan <sathya_k_83@...>
Date: Fri May 30, 2008 10:31 am
Subject: help in watir
sathya_k_83
Online Now Online Now
Send Email Send Email
 
hi
  I have installed Ruby 1.8.5-21 and also installed the watir 1.5.0 gem. but when
i use the run the below program
[code]
require 'watir'
include Watir


   # use watir gem
  test_site = 'http://www.google.com'      # set a variable
  ie =Watir::IE.new                     # open the IE browser
  ie.goto(test_site)                       # load url, go to site
  ie.text_field(:name, "q").set("pickaxe") # load text "pickaxe" into search
field named "q"
  ie.button(:name, "btnG").click           # "btnG" is the name of the Search
button, click it

  if ie.text.include?("Programming Ruby")
    puts "Test Passed. Found the test string: 'Programming Ruby'."
  else
    puts "Test Failed! Could not find: 'Programming Ruby'"
  end
[/code]


i get the below error

  ./watir.rb:4: uninitialized constant Watir (NameError)
  from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
  from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
  from watir.rb:2
  >Exit code: 1

  please tell me how to prevent this error.

  Thanks in Advance
  K Sathya Narayanan



[Non-text portions of this message have been removed]

#95 From: "Bob Jones" <bob@...>
Date: Wed May 28, 2008 3:29 pm
Subject: full time Senior Ruby on Rails job- work from anywhere...
blobjava
Offline Offline
Send Email Send Email
 
Hi,

Bob Jones here from Architechs. We are a Boston area full time tech search firm.

We currently have a Boston area client with a full time role for a Senior Ruby
on Rails
developer to help create mission critical web applications.  Very successful 80
person
company that is looking to find and reward the best in the industry.  Very open
salary
range.

Work from home or work from anywhere.

If interested please email me a word doc copy of your resume and reach me at
your
earliest convenience.

If for some reason this is not of interest to you please feel free to pass along
this email/my
contact information to a colleague or friend that may be interested.  I'd be
thrilled to
discuss the details of this opportunity.

Best Regards,

Bob Jones
Principal/Founder
Architechs
P.O. Box 119
Prides Crossing, MA 01965
978-524-8180/617-733-5969
bob@...
http://www.linkedin.com/pub/0/65/268
P.S. If you are on LinkedIn and would like to join my network please send me an
invite.

"Architechs; Focused on building lasting relationships with consistently
excellent work!"

#94 From: "suttlesjulie" <julie@...>
Date: Thu May 22, 2008 11:15 pm
Subject: Ruby on Rails/I18N Contractor for Chumby//---Pimp My Clock Radio
suttlesjulie
Offline Offline
Send Email Send Email
 
Chumby Industries Inc. (www.chumby.com) in San Diego, CA, is looking
for a Contractor with Ruby on Rails and I18N experience to deliver
results for the internationalization (I18N) effort on the server.

Chumby develops next-generation, versatile, low-cost, wireless (WiFi),
Internet-connected devices and content networks. A Chumby device
constantly broadcasts a personalized mix of web content such as news,
traffic, weather, photos, stock quotes, and video feeds and can play
internet radio and pod casts.

This candidate would be responsible for externalizing all the text
strings (both static and dynamically generated) that the website uses
so that Chumby could later change the language of the site based on
location.

Skills required:

Previous I18N efforts on browser-based platforms

Strong web-based development experience

Ruby on Rails experience

mySQL database experience

Familiarity of layout issues involved with I18N

Interested candidates send your resumes to jsuttles@...
or call 760-438-8046.

This is a video from CNBC that talks about Chumby- Pimp My Clock Radio!:
http://www.cnbc.com/id/15840232?video=742197558&play=1

#93 From: "tbone9992" <tbone9992@...>
Date: Sat Feb 16, 2008 1:42 am
Subject: godaddy deployments
tbone9992
Offline Offline
Send Email Send Email
 
Hi All,

Been struggling with a GoDaddy deployment. Wondering if anyone can help?

Simple Rails app where the app, componens, config copied directly
under the GoDaddy Rails container.

.htaccess (at same level as public) is:

RewriteEngine On
RewriteRule ^(.*)$ !/public/dispatch.fcgi  [QSA,L]

.htaccess under public is:

RewriteEngine On
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

The error when I hit the site is:
[Fri Feb 15 18:30:11 2008] [error] [client 67.190.126.169]
mod_rewrite: maximum number of internal redirects reached. Assuming
configuration error. Use 'RewriteOptions MaxRedirects' to increase the
limit if neccessary.

As if the redirects are recursing? I think my DB connection is not set
up right yet, but would assume a different error if I got that far.

Any thoughts why?

Thank you most sincerely.

#92 From: "Torsten Mangner" <tmangner@...>
Date: Wed Jan 30, 2008 6:14 pm
Subject: Re: table has two references to same table
tmangner
Offline Offline
Send Email Send Email
 
--- In RubyOnRails@yahoogroups.com, "mpfilbin" <mpfilbin@...> wrote:
>
> >> match1 << team1
> >> ... output...
> >> match1 << team2
> >> .. output ...
> >> match1.teams
> >> should return an array of teams associated with this match.

thx, mpfilbin.

i knew how to use habtm, but thats not what i wanted. i dont want to
have 1 or 3 or 4 teams on a match, but exactly two: one home, one away
team.

alexandre helped me out. thanks anyway.

#91 From: "mpfilbin" <mpfilbin@...>
Date: Wed Jan 30, 2008 5:31 pm
Subject: Re: table has two references to same table
mpfilbin
Offline Offline
Send Email Send Email
 
Hi Torsten,

I am not sure I entire understand your situation, but if I were you
this is how I might set it up:

First, I would have a table teams, a table matches, and a join-table
called matches_teams

.script/generate scaffold Team
.script/generate scaffold Match
.script/generate migration create_matches_teams match_id:integer
team_id:integer

so for your migration for your teams table

001_create_teams

create_table :teams, :force => true do |t|
t.string :name
t.timestamps
end

002_create_matches
create_table :matches, :force => true do |t|
t.datetime :kickoff
t.timestamps
end

003_create_matches_teams
create_table :matches_teams, :id => false, :force => true do |t|
t.integer match_id
t.integer :team_id
end

Now you need to set up your associations in your models so that
ActiveRecord can build proper queries

teams.rb
has_and_belongs_to_many :matches

matches.rb
has_and_belongs_to_many :teams

Now, you can open up the Rails console using the command
.script/console (or script/console sandbox for sandbox mode) and play
around with the associations

>> team1 = Team.create(:name => 'Mercenaries')
>> ... output ...
>> team2 = Team.create(:name => 'Matadors')
>> ... output ...
>> match1 = Match.create(:kickoff => Time.now)
>> ... output ...
>> match1 << team1
>> ... output...
>> match1 << team2
>> .. output ...
>> match1.teams
>> should return an array of teams associated with this match.

Now I haven't tried any of this code above, but this is how HABTM
table associations work.  If you never need to have a join table with
additional attributes consider using :through => :table_name
associations, they are more rich.

I hope this helps!
- Mike

--- In RubyOnRails@yahoogroups.com, "Torsten Mangner" <tmangner@...>
wrote:
>
> hi there,
>
> i got to tables "teams" and "matches".
>
> create_table :teams do |t|
>   t.string :name
>   t.timestamps
> end
>
> create_table :matches do |t|
>   t.datetime :kickoff
>   t.timestamps
> end
>
> i have to reference two teams (home & away) in the matches table. but
> i dont know how to do it.
>
> when i do something like this:
>
> t.column 'home_team_id', :integer
> t.column 'away_team_id', :integer
>
> then i loose the association to the teams-table.
>
> anyone with a tip for me? any help is highly appreciated.
>

#90 From: "Torsten Mangner" <tmangner@...>
Date: Wed Jan 30, 2008 11:21 am
Subject: table has two references to same table
tmangner
Offline Offline
Send Email Send Email
 
hi there,

i got to tables "teams" and "matches".

create_table :teams do |t|
   t.string :name
   t.timestamps
end

create_table :matches do |t|
   t.datetime :kickoff
   t.timestamps
end

i have to reference two teams (home & away) in the matches table. but
i dont know how to do it.

when i do something like this:

t.column 'home_team_id', :integer
t.column 'away_team_id', :integer

then i loose the association to the teams-table.

anyone with a tip for me? any help is highly appreciated.

#89 From: "Torsten Mangner" <tmangner@...>
Date: Wed Jan 30, 2008 11:25 am
Subject: Re: regular expression
tmangner
Offline Offline
Send Email Send Email
 
--- In RubyOnRails@yahoogroups.com, "sangeetha_geethu05"
<sangeetha_geethu05@...> wrote:
> $key_word="C++"
>
> reg.rb:3: nested *?+ in regexp: /C++/ (RegexpError)

try to escape the "+" since it has special meaning in regex.

$key_word = "c\+\+"

#88 From: "Daniel Racovitan" <danielracovitan@...>
Date: Fri Jan 25, 2008 1:28 pm
Subject: doc for madeleine
danielracovitan
Offline Offline
Send Email Send Email
 
Hi all,

I am looking for some documentation for madeleine API
(http://madeleine.rubyforge.org/)
The link on their site returns a 404 error. Do you know an alternative
location?

#87 From: "mpfilbin" <mpfilbin@...>
Date: Sat Jan 12, 2008 1:22 pm
Subject: Re: Hi all
mpfilbin
Offline Offline
Send Email Send Email
 
If you are a visual learner, I would recommend Ryan Bates blog of
webcasts (or railscasts) at www.railscasts.com.  He presents some
practical solutions to very common problems.  You should also spend a
lot of time with the API's for both Rails and for Ruby since they
usually have a couple of examples on how to use the methods; the Rails
API is particularly good at this.  If do not have a persistent
Internet connection, I would recommend generating the documentation
for the version of rails that you are using.  You can accomplish this
by running a couple rake commands from your console or command prompt:

Before you get started, make sure you are in the top of your
application directory e.g. /rails_apps/my_rails_app/

1) First freeze your version of rails by calling "rake rails:freeze:gems

2) Use RDoc to create the API documentation by calling "rake doc:rails"

The resulting HTML documentation should be located in your doc/api
subdirectory


--- In RubyOnRails@yahoogroups.com, "satyaatkiit" <satyaatkiit@...> wrote:
>
> Hi all
> I am new to Ruby on Rails. I want some materials to start this. Can
> anyone having any tutorials regarding this send me ?
>
> Thanks n Regards
> Satyananda Behera
> CGI India
> Bangalore,India
>

#86 From: "Bijesh Naidu" <bijesh.naidu@...>
Date: Tue Jan 1, 2008 2:22 pm
Subject: Re: Bizarre Error
suhas_p456
Offline Offline
Send Email Send Email
 
HI,

you can try by small change as follows,


521: def create_option
522: @option = Option.new
523: @option.name <http://o.name/> = "New Option"
524:
525: @option.save
...........................
....................



--




On Nov 15, 2007 11:26 PM, Paul <pschwarz99@...> wrote:

>   I have been getting a strange error message and I can't figure out
> what's causing it, and haven't found the answer online anywhere. The
> error message says "Can't convert String into Integer" with this stack
> trace:
>
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3
> /lib/active_record/associations/association_proxy.rb:123:in
> `[]'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3
> /lib/active_record/associations/association_proxy.rb:123:in
> `send'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3
> /lib/active_record/associations/association_proxy.rb:123:in
> `method_missing'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3
> /lib/active_record/associations/has_many_association.rb:98:in
> `method_missing'
> (eval):1:in `id'
> #{RAILS_ROOT}/app/controllers/admin_controller.rb:525:in `create_option'
>
> This is the function from controllers/admin_controller.rb
>
> 521: def create_option
> 522: @option = Option.new do |o|
> 523: o.name = "New Option"
> 524: end
> 525: @option.save
> 526: respond_to do |format|
> 527: format.js do
> 528: render :update do |page|
> 529: page.insert_html :bottom, "options", {:partial =>
> 'option', :object => @option}
> 530: end
> 531: end
> 532: end
> 533: end
>
> and models/option.rb
>
> class Option < ActiveRecord::Base
> has_many :attributes, :dependent => :destroy
> has_many :values, :through => :attributes
> end
>
> I have tried replacing "New Option" with a number and changing the id
> field to varchar(255) neither worked; this looks like something in the
> save function is going wrong and I'm getting a useless error message.
> If anyone has encountered and solved this problem, I would appreciate
> a tip.
>
> Thank You.
>
>
>


[Non-text portions of this message have been removed]

#85 From: "Paul" <pschwarz99@...>
Date: Thu Nov 15, 2007 5:56 pm
Subject: Bizarre Error
feldar_99
Offline Offline
Send Email Send Email
 
I have been getting a strange error message and I can't figure out
what's causing it, and haven't found the answer online anywhere. The
error message says "Can't convert String into Integer" with this stack
trace:

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/association\
s/association_proxy.rb:123:in
`[]'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/association\
s/association_proxy.rb:123:in
`send'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/association\
s/association_proxy.rb:123:in
`method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/association\
s/has_many_association.rb:98:in
`method_missing'
(eval):1:in `id'
#{RAILS_ROOT}/app/controllers/admin_controller.rb:525:in `create_option'

This is the function from controllers/admin_controller.rb

521:  def create_option
522:    @option = Option.new do |o|
523:      o.name = "New Option"
524:    end
525:    @option.save
526:    respond_to do |format|
527:      format.js do
528:        render :update do |page|
529:          page.insert_html :bottom, "options", {:partial =>
'option', :object => @option}
530:        end
531:      end
532:    end
533:  end

and models/option.rb

class Option < ActiveRecord::Base
   has_many :attributes, :dependent => :destroy
   has_many :values, :through => :attributes
end

I have tried replacing "New Option" with a number and changing the id
field to varchar(255) neither worked; this looks like something in the
save function is going wrong and I'm getting a useless error message.
  If anyone has encountered and solved this problem, I would appreciate
a tip.

Thank You.

#84 From: "Paul" <pschwarz99@...>
Date: Thu Nov 15, 2007 5:43 pm
Subject: Re: Hi all
feldar_99
Offline Offline
Send Email Send Email
 
I would recommend Agile Web Development with Rails by Dave Thomas.

#83 From: "Kalhan Deepak" <kalhan.d@...>
Date: Mon Oct 15, 2007 10:50 am
Subject: Re : Hi all
saajankalhan...
Offline Offline
Send Email Send Email
 
Dear Satyananda Behera,Welcome to the ruby on rails group.Kindly go through from
the following link for know more about
ruby.http://www.math.umd.edu/~dcarrera/ruby/0.3/Many regards,Deepak KalhanOn
Fri, 12 Oct 2007 06:09:19 -0000 RubyOnRails@yahoogroups.com wroteHi all I am new
to Ruby on Rails. I want some materials to start this. Can anyone having any
tutorials regarding this send me ?Thanks n RegardsSatyananda BeheraCGI
IndiaBangalore,India

  =================================================
Deepak Kalhan
+9199861-97497


[Non-text portions of this message have been removed]

#82 From: "Prashant" <ptumuluri@...>
Date: Sat Oct 13, 2007 6:47 pm
Subject: DCRUG: Using Rails to Create an Enterprise App: A Real-Life Case Study
anamaka
Online Now Online Now
Send Email Send Email
 
Topic: Using Rails to Create an Enterprise App: A Real-Life Case Study

Date & Time: Thursday, October 18, 2007, 7pm-8:30 pm

Speaker: Dave Keener
David Keener is an IT professional, consultant and writer with over 20
years of experience. He is currently a web architect for America
Online, where he has just completed and fielded AOL's first enterprise
Rails app for internal corporate use. For more information on David
Keener, check out his blog at www.keenertech.com (yes, he knows it's
an ASP.NET site and not a Rails site, but he's too busy to do anything
about it right now).

Location:
The George Washington University
Media and Public Affairs Building
Room B02
805 21st Street NW
Washington, DC
http://www.gwu.edu/~map/hmap/index.cfm?bldg=103

Topic Description:
It seems that most Rails apps are so-called "green-field"
applications, i.e. - brand-new applications with no legacy baggage.
Find out what it takes to use Rails to create an enterprise corporate
application. This real-life case study of an actual AOL development
effort will focus on how successful the effort was; the pitfalls that
were encountered and the solutions that were devised. The discussion
will also include tips for dealing with one of the nastiest legacy
databases you'll ever encounter.

#81 From: "satyaatkiit" <satyaatkiit@...>
Date: Fri Oct 12, 2007 6:09 am
Subject: Hi all
satyaatkiit
Offline Offline
Send Email Send Email
 
Hi all
I am new to Ruby on Rails. I want some materials to start this. Can
anyone having any tutorials regarding this send me ?

Thanks n Regards
Satyananda Behera
CGI India
Bangalore,India

#80 From: "cool.morpheus" <cool.deadlock@...>
Date: Thu Oct 4, 2007 8:45 am
Subject: httpunit similar api
cool.morpheus
Offline Offline
Send Email Send Email
 
Is there any api in ruby which can work as HttpUnit?

#79 From: "febbed" <febbed@...>
Date: Thu Sep 6, 2007 5:05 am
Subject: ChicagoRuby.org - Ruby and Rails Enthusiasts
febbed
Offline Offline
Send Email Send Email
 
ChicagoRuby.org is a group of Chicago area Ruby and Ruby on Rails
enthusiasts. We cover multiple levels of Ruby on Rails expertise.
Here's our September 15, 2007 agenda:

     * Beginner Topic: [Bobby Jacob] Agile Rails

     * Intermediate Topic: [Ray Hightower] Overview of Radiant CMS

     * Advanced Topic: [Wil Chung] When All Else Fails, Go Rails
Spelunking

But wait... there's more! We're kicking off our RadiantCMS
extensions project at this meeting! For location and RSVP info, visit
http://chicagoruby.org.

#78 From: "bruno_prieto_reis" <bruno.p.reis@...>
Date: Wed Sep 5, 2007 12:51 am
Subject: Action Mailer - Must issue a STARTTLS command first
bruno_prieto...
Offline Offline
Send Email Send Email
 
Hi all,

I want to send an e-mail using google smtp, but I get the following
message:

Must issue a STARTTLS command first

does anyone here knows what should I do?

thanks

Bruno Reis

#77 From: "S A B B I R" <cool.deadlock@...>
Date: Tue Sep 4, 2007 8:20 pm
Subject: Re: running ruby
cool.morpheus
Offline Offline
Send Email Send Email
 
Hi buddy,

download the Radrails  as IDE and download the instanterails from web.
extract the InstantRails and show ruby.exe in  InstantRails to radrails
preference.
I think it will be easy for to work on ROR in this way.

let me know if u feel any problem.
Good luck.

-sabbir
[Man without destination  ]




On 9/5/07, Niclas Magnusson <niclas.magnusson@...> wrote:
>
>
>
> yahdoco skrev:
> >
> >
> > Hi Everyone...I am totally new to this language. I have
> > installed ruby on my computer. I have a ruby icon on
> > desktop. The name of the icom is hello.rb. Inside I have
> > the following text:
> >
> > #generate some simple output (comment)
> > puts "Hello World"
> >
> > When I click on this icon, I get a small black screen
> > the disappears after a few seconds. I assume it has
> > some words on it but the screen goes by so fast I can't read
> > it. How do I change the screen to show black letters
> > on a white background? How do I keep the screen visible
> > until I choose to click it off?
> >
> > Thanks for your help. Yahdoco
>
> I'm new to Ruby too, but it should work if you open up a console, change
> directory to your desktop (C:\Documents and
> Settings\<username>\Desktop\) and there types "ruby hello.rb"
>
> /Niclas
>
>



--
Thanks,
Sabbir
Sr. Software Engineer.


[Non-text portions of this message have been removed]

Messages 77 - 106 of 107   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help