[Rails] Re: no such file to load -- my_extensions (MissingSourceFile)

2013-12-22 Thread Toby Rodwell
Many thanks to you both - indeed, I was being a muppet, and it's exactly as you suspected, namely I'd forgotten to copy across a file. Grep'ing for the file name helped me track it down. Thanks again and Merry Christmas! -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] no such file to load -- my_extensions (MissingSourceFile)

2013-12-20 Thread Toby Rodwell
I have a Rails application runnng on one machien quite happily, using Ruby 1.9.1-p243 and Rails 2.3.3. I copied the app and config folders to another machine, on which I'm also running 1.9.1-p243, but via RVM. Whenever I try to launch the Rails application ('server', 'runner', 'console') I get

[Rails] Passing arrays between controllers/views

2011-09-09 Thread Toby Rodwell
I have a controller that produces (through its associated 'view' displays summary information of) a number of arrays. On that view page I would like links to other pages, one per array, which shows more detailed information on the array in question. I tried passing the array as a parameter to a

[Rails] Re: Recursive self-referential many-to-many relationship

2010-06-17 Thread Toby Rodwell
Marnen Laibow-Koser wrote: You want awesome_nested_set, which will let you do that with one query. The Glue model is unnecessary. Thanks very much for the info. I've had a quick look at the documentation and I see it makes use of fields :lft and :rgt -I guess I can use aliases for these,

[Rails] Re: Recursive self-referential many-to-many relationship

2010-06-17 Thread Toby Rodwell
Marnen Laibow-Koser wrote: Toby Rodwell wrote: Marnen Laibow-Koser wrote: You may be able to use aliases, but how does this solve the basic problem of adding fields to the DB? I don't add fields (or even records) to this database - I just use RoR as way a way to get data out in a useful

[Rails] Recursive self-referential many-to-many relationship

2010-06-16 Thread Toby Rodwell
I have a 'Circuit' table, and a 'Glue' table to perform a many-to-many join on the circuit records, such at a circuit can have many subcircuits (its component parts) and many supercircuits (circuits which it itself is a part of). has_and_belongs_to_many :subcircuits, :class_name = Circuit,

[Rails] Re: Extending a module in a controller

2010-05-23 Thread Toby Rodwell
Frederick Cheung wrote: On May 23, 12:59�am, Marnen Laibow-Koser li...@ruby-forum.com wrote: ... by putting it inside the controller like that you've created a new module called LookupController::Enumerable rather than extending Enumerable. If I were you I'd keep extensions to core classes

[Rails] Extending a module in a controller

2010-05-22 Thread Toby Rodwell
I'm trying to extend Enumerable in my Rails app. I've started with just the controller where I wanted to use this method i.e. class LookupController ApplicationController module Enumerable def my_compress ... but when I visit the web page in question I get No method 'my_compress'

[Rails] Re: Working round 'invalid byte sequence'

2009-11-03 Thread Toby Rodwell
Matt Jones wrote: On Nov 2, 5:31�pm, Toby Rodwell rails-mailing-l...@andreas-s.net wrote: this issue? �Without being an expert in this area (obviously) I guess that either I can try to tell Ruby to treat the MySQL data as an encoding other than UTF-8 (I guess US-ASCII �but it could be trial

[Rails] Working round 'invalid byte sequence'

2009-11-02 Thread Toby Rodwell
I am a very amateur Rubyist who, amongst other things, likes to use a simple Rails app to query my company's MySQL config database. The server I now use to do this has got 1.9.1 and Rails 2.3.3. I've now hit the 'problems' related to 1.9 and string encoding, which means that when Rails try to