Re: [Rails] Re: ActionController::SessionRestoreError

2010-04-10 Thread Rahul Mehta
Thanks Fred My problem is solved by clearing history of browser. thanks rahul On Sat, Apr 10, 2010 at 5:16 PM, Frederick Cheung < frederick.che...@gmail.com> wrote: > > > On Apr 10, 12:01 pm, Rahul Mehta wrote: > > i havent used session , is it due to plugins i have used and not > > installed

Re: [Rails] gem install rails (Errno::ENOENT) No such file or directory

2010-04-10 Thread Chris Morris
Try running Sysinternals Process Monitor and look for file system activity around the time the error occurs. Could give more details on why ruby can't see that folder. (What's the error msg on XP? That msg looks Vista specific). On Fri, Apr 9, 2010 at 3:48 PM, Jesús Dugarte wrote: > I have two P

[Rails] Re: Rendering a Partial as an Alternative

2010-04-10 Thread doug
> This may actually be worse but it is another way... In terms of elegance, I think that it's about a toss up. However, I think that your suggestion has a slight distinct advantage. If I use my approach, I have to deal with the actual partial twice, once to test whether it exists and once to rend

Re: [Rails] Moving to Widgets from Standard Rails UI

2010-04-10 Thread Anthony Crumley
Smart RoR, We went down the ExtJS path and it was a painful one. The widgets can provide a nice user experience but it comes with a high price on the development side. When you step off the golden path with Rails you lose a lot of the magic. We are in the process of removing ExtJS from our appl

Re: [Rails] Re: Rendering a Partial as an Alternative

2010-04-10 Thread Anthony Crumley
Rahul, Exceptions handling in Ruby is done the following way. begin rescue end When a partial template is missing Rails will throw an exception. As a result, to catch a missing partial template exception (ActionView::MissingTemplate) you need to rescue that exception by name. In ERB the

[Rails] How to copy a selected value into a text_field

2010-04-10 Thread RichardOnRails
In app\views\expenses\new.html.erb, I (mistakenly) replaced the script/generated: <%= f.label :vendor %> <%= f.text_field :vendor %> with: <%= f.label :vendor %> <% @current_vendors = Vendor.find(:all, :order=>"nickname") %> <%= select_tag "list", options_for_select(@current_vendors) %> This (if

Re: [Rails] Image preloading

2010-04-10 Thread steve ross
On Apr 10, 2010, at 9:32 AM, ChaosKnight wrote: > > Hi, I am still very new to Ruby on Rails, but I'm busy with my first > RoR website, everything went well, until I realized that my images > didn't preload... On previous websites I used a simple JavaScript > preloader that seemed to work very wel

[Rails] Re: Migration update with multiple joined tables

2010-04-10 Thread David Raffauf
def self.up execute "UPDATE posts SET state_id = (SELECT states.id FROM states, zips WHERE posts.zip_id = zips.id AND states.abbreviation = zips.state)" end def self.down Post.find(:all).each { |post| post.update_attribute :state_id, nil } end -- Posted via http://www.ruby-forum

[Rails] Re: Migration update with multiple joined tables

2010-04-10 Thread David Raffauf
I found out about execute statements, but then I also learned that sqlite3 doesn't support this syntax. I'm not sure what to do. This seems like a common need. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rai

[Rails] Re: Can't Convert Symbol into Integer

2010-04-10 Thread Eric Powell
Frederick Cheung wrote: > On Apr 10, 3:25�pm, Eric Powell wrote: >> I must have really screwed something up big time. �I was trying to >> modify SortHelper to work on multiple columns and now I can't get >> anything to work even though I reverted all my changes. >> > > Looks like at some point yo

[Rails] Migration update with multiple joined tables

2010-04-10 Thread David Raffauf
I'm trying to do an update that requires table joins but I can't find any examples of updates beyond simple attribute value assignments. I have a select statement like this: SELECT title, state, name FROM posts, zips, states WHERE posts.zip_id = zips.id AND states.abbreviation = zips.state; The

[Rails] Re: please help; form_for passes nil

2010-04-10 Thread pepe
I am a little confused. If your HTML form shows this: wrote: > When I did create, it did make an object and a row in the database > table.  When I go in thru mysql, I can see that it was able to fill > three fields:  id (which is an autoincrement field), the created_at > and updated_at fields, wh

[Rails] Re: Validations problem

2010-04-10 Thread pepe
Are you somehow inserting a blank in your model with a before_save or similar callback? What is the value of the column in the created record? Are you the only one with access to the DB tables? Could somebody have changed the column to allow now null values? On Apr 9, 7:45 am, Hemant Bhargava wro

[Rails] Re: ruby 1.8.7p249 + rails 2.3.5 + Snow Leopard = hung processes?

2010-04-10 Thread markds75
I found this blog article just after posting: http://www.darianshimy.com/2009/09/fixing-rails-in-snow-leopard/ I figured I'd try his fix for mongrel, which involves uninstalling the gem and re-installing it. But whenever I try to run "sudo gem install mongrel", the gem process seems to hang. I've

[Rails] Re: restful authentication help : updates never reach databa

2010-04-10 Thread DJ Cole
DJ Cole wrote: > my setup: save(false) > > acts_as_state_machine latches onto after_create, and THEN plops in the > authentication_code) ... alas, save(false, or any subsequent calls to That should read "activation_code " -- Posted via http://www.ruby-forum.com/. -- You received this messa

[Rails] restful authentication help : updates never reach database

2010-04-10 Thread DJ Cole
my setup: OS X 10.6.3 rails (2.3.5) sqlite the problem: moving this old code to a new project (I didn't want to hunt down yet-another-authentication module as I can't tell what is abandoned or not, I figured copy paste would be the quickest - no such luck), basic user authentication is broken. I f

[Rails] ruby 1.8.7p249 + rails 2.3.5 + Snow Leopard = hung processes?

2010-04-10 Thread markds75
A few weeks ago I updated my development computer to Snow Leopard (finally). I put it off because I was in the middle of a project, and it seems its a good thing I did. Last week I started something new and it seems that any rails related ruby process will get ... stuck, I guess is the best word. I

[Rails] Re: version control system

2010-04-10 Thread pepe
Very good point Fred. Thank you all for all your comments. I really appreciate it. On Apr 10, 2:25 pm, Frederick Cheung wrote: > On Apr 10, 2:58 pm, pepe wrote: > > > Thanks guys. > > > Based on what I've read so far about VCSs and especially about git I > > know that I can 'fork'/'clone' the r

[Rails] Re: version control system

2010-04-10 Thread pepe
Excellent Michael. Thank you very much for your comments. On Apr 10, 12:00 pm, MichaelF wrote: > To echo what others have said here you are going to want to use a > distributed version control system for this and the two most popular > are Git and Mercurial. > > Both do what you want equally well

[Rails] Image preloading

2010-04-10 Thread ChaosKnight
Hi, I am still very new to Ruby on Rails, but I'm busy with my first RoR website, everything went well, until I realized that my images didn't preload... On previous websites I used a simple JavaScript preloader that seemed to work very well: function preloadImages() { if (document.image

[Rails] Re: Reloading controller plugins on each request

2010-04-10 Thread Frederick Cheung
On Apr 10, 4:38 pm, Nick wrote: > > On Apr 10, 11:06 am, "kel...@gmail.com" wrote: > > > Did you try require_dependency instead of require? > > I've never heard of require_dependency. I just gave it a try, but > unfortunately, all requests but the first result in this error: > > "A copy of Act

[Rails] Re: Can't Convert Symbol into Integer

2010-04-10 Thread Frederick Cheung
On Apr 10, 3:25 pm, Eric Powell wrote: > I must have really screwed something up big time.  I was trying to > modify SortHelper to work on multiple columns and now I can't get > anything to work even though I reverted all my changes. > Looks like at some point you stored something in sessi...@s

[Rails] Re: version control system

2010-04-10 Thread Frederick Cheung
On Apr 10, 2:58 pm, pepe wrote: > Thanks guys. > > Based on what I've read so far about VCSs and especially about git I > know that I can 'fork'/'clone' the repository but I still didn't get > the answer (or I am too thick to get it) that I am looking for. > > Fred, I thought branches are just u

[Rails] Re: test database and migrations

2010-04-10 Thread Frederick Cheung
On Apr 10, 3:17 pm, Grary wrote: > Frederick, > > Thanks. So, my desire to have pre-populated (whether from seeding or > otherwise) databases available in testing is unusual? I would have > expected a basic interest in having any and all development data, > e.g., zip code data, available for tes

[Rails] Re: Don't Automatically start SESSION?

2010-04-10 Thread David Zhu
i really need help. anyone got a solution? On Apr 10, 8:51 am, David Zhu wrote: > how do i disable it? > > thanks > > On Apr 10, 2:01 am, Priyanka Pathak wrote: > > > Hi, > >     In registration method it's default set the registering user to > > session when you implement authentication plugin.

[Rails] accepts_nested_attributes + polymorphic association

2010-04-10 Thread Dan Marks
im having an issue where my my polymorphic associations arent being deleted when using accepts nested attributes there are other accepts_nested_attributes being used and they are deleting fine, just the polymorphic association before i go down the path of intense thrashing at this...is this a known

[Rails] Re: Reloading controller plugins on each request

2010-04-10 Thread Nick
On Apr 10, 11:38 am, Nick wrote: > Is there a way to configure Rails to reload the plugin for each request? > > Here's the code:http://gist.github.com/361804 The answer's dead easy. Those child modules and classes need to split out into separate files. So ActsAsDashboard::Config must be in lib/ a

[Rails] Re: Validations problem

2010-04-10 Thread Viorel
You should remove:null => false. With it, you have a 0 in any new record, so validates_presence_of :employee_id will return true. -- 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...

[Rails] Re: version control system

2010-04-10 Thread MichaelF
To echo what others have said here you are going to want to use a distributed version control system for this and the two most popular are Git and Mercurial. Both do what you want equally well but Mercurial is (IMO) simpler to learn and use as it has some implicit assumptions that Git does not. Th

[Rails] Re: Controller Tests fail

2010-04-10 Thread Samiron
How did you write your Business and User models? What you are trying to do is as simple as a relation between User and Business model. And i guess it should be like the following: class User < AR::B has_many :businesses # or # has_one :business end class Business < AR::B belong_to :user

[Rails] Re: Reloading controller plugins on each request

2010-04-10 Thread Nick
> > Is there a way to configure Rails to reload the plugin for each request? > > > Here's the code:http://gist.github.com/361804 > > > Thanks! > > Nick On Apr 10, 11:06 am, "kel...@gmail.com" wrote: > Did you try require_dependency instead of require? I've never heard of require_dependency. I ju

[Rails] Re: Reloading controller plugins on each request

2010-04-10 Thread kel...@gmail.com
Did you try require_dependency instead of require? > Is there a way to configure Rails to reload the plugin for each request? > > Here's the code:http://gist.github.com/361804 > > Thanks! > Nick -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Can't Convert Symbol into Integer

2010-04-10 Thread Eric Powell
I must have really screwed something up big time. I was trying to modify SortHelper to work on multiple columns and now I can't get anything to work even though I reverted all my changes. I keep getting the error: can't convert Symbol into Integer C:/Users/Eric Powell/Documents/ruby/my1fnc/app/he

[Rails] Re: test database and migrations

2010-04-10 Thread Grary
Frederick, Thanks. So, my desire to have pre-populated (whether from seeding or otherwise) databases available in testing is unusual? I would have expected a basic interest in having any and all development data, e.g., zip code data, available for testing purposes, but my takeaway from your respon

[Rails] test database and migrations

2010-04-10 Thread Grary
Hi, I'd like to have the results of a migration file that prepopulates my development database available for testing. So, right now, after the usual rake migration, I can access my prepopulated data via script/ console, but not in my unit tests. I've reviewed comments on this subject but the custo

[Rails] Re: version control system

2010-04-10 Thread pepe
Thanks guys. Based on what I've read so far about VCSs and especially about git I know that I can 'fork'/'clone' the repository but I still didn't get the answer (or I am too thick to get it) that I am looking for. Fred, I thought branches are just used for development that later on have to be me

[Rails] Re: test database and migrations

2010-04-10 Thread Frederick Cheung
On Apr 10, 2:30 pm, Grary wrote: > Hi, > > I'd like to have the results of a migration file that prepopulates my > development database available for testing. So, right now, after the > usual rake migration, I can access my prepopulated data via script/ > console, but not in my unit tests. I've

[Rails] test database and migrations

2010-04-10 Thread Grary
Hi, I'd like to have the results of a migration file that prepopulates my development database available for testing. So, right now, after the usual rake migration, I can access my prepopulated data via script/ console, but not in my unit tests. I've reviewed comments on this subject but the custo

Re: [Rails] version control system

2010-04-10 Thread Michael Pavling
On 10 April 2010 03:25, pepe wrote: > Also take into consideration that we have never used a version control > system so my questions might just be due to lack of knowledge and/or > understanding as of how to use the VCS. Well, distributed version control is going to be your friend here, but you

[Rails] Controller Tests fail

2010-04-10 Thread Graham Farrell
Hi all, I'm hoping someone can help me here I'm trying to carry out functional testing, my IDE is NetBeans 6.8 and I've found that any tests on controllers who have to deal with related data are failing. I've got a controller called business that hold the details of a business along with its owne

[Rails] Re: Don't Automatically start SESSION?

2010-04-10 Thread David Zhu
how do i disable it? thanks On Apr 10, 2:01 am, Priyanka Pathak wrote: > Hi, >     In registration method it's default set the registering user to > session when you implement authentication plugin. if you disable that > functionality in register/signup method of authentication than it solve > y

[Rails] Re: ActionController::SessionRestoreError

2010-04-10 Thread Frederick Cheung
On Apr 10, 12:01 pm, Rahul Mehta wrote: > i havent used session , is it due to plugins i have used and not > installed in new app. > for that what i need to do.. Well you need to figure out what those plugins are doing. If you restart your browser and the problem goes away then the problem was

[Rails] Re: ActionController::SessionRestoreError

2010-04-10 Thread Rahul Mehta
it is giving this error where <%=flash[:message]%> flash message is given pls help... On Apr 10, 4:01 pm, Rahul Mehta wrote: > i havent used session , is it due to plugins i have used and not > installed in new app. > for that what i need to do.. > > On Apr 10, 3:40 pm, Frederick Cheung > w

[Rails] Re: ActionController::SessionRestoreError

2010-04-10 Thread Rahul Mehta
i havent used session , is it due to plugins i have used and not installed in new app. for that what i need to do.. On Apr 10, 3:40 pm, Frederick Cheung wrote: > On Apr 10, 11:32 am, Rahul Mehta wrote:>   > ActionController::SessionRestoreError in Content_masters#index > > > Showing app/views/co

[Rails] Re: version control system

2010-04-10 Thread Frederick Cheung
On Apr 10, 3:25 am, pepe wrote: > Hello, > > I'm sorry if this is not the right place for this question. Please > feel free to point me in the right direction. > > Also take into consideration that we have never used a version control > system so my questions might just be due to lack of knowled

[Rails] Re: ActionController::SessionRestoreError

2010-04-10 Thread Frederick Cheung
On Apr 10, 11:32 am, Rahul Mehta wrote: >  ActionController::SessionRestoreError in Content_masters#index > > Showing app/views/content_masters/index.html.erb where line #77 > raised: > > Session contains objects whose class definition isn\'t available. > Remember to require the classes for all

[Rails] Dvalve! we called the heart of outsourcing world.

2010-04-10 Thread Dvalve.com
Dvalve.com is an online talent workplace that helps companies hire and manage professionals online to get work done and grow their businesses. Dvalve matches employers with a ready and qualified workforce and rated, tested professionals with technical, marketing and business skills. Dvalve also pr

[Rails] nested one-to-one forms question

2010-04-10 Thread Joel Day
Hello, I must admit I'm new to rails (I actually come from the .net world, but I've been meaning to expand for some time now) I'm trying to create a user registration page (just getting my feet wet really) and I've hit a wall. I'm pretty sure I'm doing this wrong, so I need some straightening ou

[Rails] Re: ActionController::SessionRestoreError

2010-04-10 Thread Rahul Mehta
ActionController::SessionRestoreError in Content_masters#index Showing app/views/content_masters/index.html.erb where line #77 raised: Session contains objects whose class definition isn\'t available. Remember to require the classes for all objects kept in the session. (Original exception: #{con

[Rails] ActionController::SessionRestoreError

2010-04-10 Thread Rahul Mehta
Hiii created new application from old application copy of that the old application is running but new application is not running fine ,, please help its urgent... ActionController::SessionRestoreError in Content_masters#index Showing app/views/content_masters/index.html.erb where line #77

[Rails] Re: Rendering a Partial as an Alternative

2010-04-10 Thread Rahul Mehta
Hi Anthony, <% begin %> <%= render :partial => 'custom' %> <% rescue ActionView::MissingTemplate %> Default <% end %> why this begin and end are used what is mean by <% rescue ActionView::MissingTemplate %> can you tell me On Apr 10, 11:19 am, Anthony Crumley wrote: > Doug, > > This may a

[Rails] Re: gem install rails (Errno::ENOENT) No such file or directory

2010-04-10 Thread Rahul Mehta
1)Go to http://rubyonrails.org/download that is official download page for ruby on rails. 2)First download ruby. For windows it is one click installer package just download it and double click it and follow installation wizard. 3)Download ruby gems from same page, extract it and then

[Rails] Need a dropdown having "more.." option

2010-04-10 Thread Samiron
I have a collection of products that I am showing in a dropdown. Now at the first view it will show only first 10 products in the dropdown with an option "more..." at last. if user clicks the "more..." he can see all the following products in that dropdown list (this is not any ajax request, just j