Re: [Rails] How to define virtual attribute for date_select drop menu using active model

2012-08-15 Thread pepe
I have never done this. Just trying to help. I think the problem you're having is that your field doesn't have a date compatible value. If you check it's class it might be NilClass. Since the fields does not belong to a table date_select probably has no idea what to do with it because it doesn'

[Rails] Re: Best practice on Javascript and rails

2012-06-29 Thread pepe
This might not be what you're looking for but I'd start by reading up on the Asset Pipeline . Then there are useful railscasts on both subjects. On Thursday, June 28, 2012 8:03:40 AM UTC-4, Ruby-Forum.com User wrote: >

[Rails] Re: RoR 2.3.5

2012-06-14 Thread pepe
If you can, upgrade, especially if your app is developed for Windows. I have developed several apps in 2.x and they are increasingly becoming a nightmare to maintain. Most of the better gems I've wanted to use work only under Rails 3 and the alternatives are usually not good. I am currently upg

[Rails] Recommend an image gallery with shopping cart

2012-06-10 Thread Pepe Sanchez
Hi all Anyone can recommend a web applicaiton or a CMS to manage images and videos that : • Accepts payments, needs a shopping cart based on PayPal • Mobilized, displays properly on Android, iPhone, Nokia, and others • Handles security access -- Posted via http://www.ruby-forum.com/. -- Yo

[Rails] Re: Rack Middleware or after filter

2012-05-31 Thread pepe
If you are letting the request go through the Rails stack already I don't see how you can make the response go any faster either way. If you were catching the request in the middleware on its way to the Rails stack and returned right away without going through Rails then it would be a different sto

[Rails] Re: autocomplete word by word

2012-05-07 Thread pepe
I think what Guillem is saying is that you can still do it with jQuery/ Javascript like you did before and that you'll need to control the logic yourself. On May 6, 5:02 pm, rubix Rubix wrote: > Hi, > I am trying to implement an autocomplete form with rails, I used jquery > in a first version, to

[Rails] Re: Errno::ENOENT: No such file or directory

2012-05-07 Thread pepe
It might not have anything to do with your problems but when I develop/ test in Windows I get the same type of error when the log files get big. The only thing I have to do to keep going is clear them up. On Apr 30, 8:28 am, "Amir Z." wrote: > I am working with Agile Web Development Book. I creat

[Rails] Re: Is there a way to redirect from one controller action to another without a server trip?

2012-03-09 Thread pepe
Without thinking too much about it, how about if you create another class that both your controllers can use? # This class processes your actions class YourActionClass def your_action(params) # here you process your request end end # This is the controller you want to process the "redirec

[Rails] Re: RUBY on Rails CMM level company does not have much employees

2011-09-21 Thread pepe
> Me, I'm betting on the mammals. Good one! :D -- 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 unsubscribe from this group, send email to rubyonrails-talk+unsubs

[Rails] Re: RUBY on Rails CMM level company does not have much employees

2011-09-21 Thread pepe
> Me, I'm betting on the mammals. > > -- > Hassan Schroeder > hassan.schroe...@gmail.comhttp://about.me/hassanschroeder > twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,

[Rails] Re: System-wide db-driven config

2011-09-21 Thread pepe
I use a DB table but store one value per setting. Then in my code I just access whichever record I need to gain access to the value. This gives me great flexibility to maintain the setting values. Then I access the table only when needed. It might not be as fast as having all values retrieved at on

[Rails] Re: Maths with in Rails

2011-09-09 Thread pepe
Without the code used in the display action it's difficult to know what's going on but I'd guess you're using an integer at some point and that causes loss of precision. On Sep 8, 4:37 am, Eugene de Winnaar wrote: > Hi All > > I have a idea that I am doing and it is working so far but when it > c

[Rails] high volume write DB

2011-09-06 Thread pepe
Hi, At my job we're using Cassandra (no-SQL) for a project that is estimated to have a real high level of DB access, especially writes. The numbers are supposedly to be easy in the millions of transactions but I don't really have an estimate of transactions per minute/hour, probably hundreds of th

[Rails] Re: rspec post with file

2011-09-02 Thread pepe
Thanks a lot Fred, I'll look into that. On Sep 2, 11:38 am, Frederick Cheung wrote: > On Sep 2, 2:46 pm, pepe wrote: > > > Hi, > > > I am working on a mobile app that sends a post with a file (a picture) > > "embedded" in the body of the request. It i

[Rails] Re: rspec post with file

2011-09-02 Thread pepe
> What does that mean?  Are you saying that the html element for the file > upload doesn't have a name attribute?  Well, then give it one. There is no HTML element for the file upload The request is built by a cell phone application, not a browser, it has parameter values (e.g.: the file name) but

[Rails] rspec post with file

2011-09-02 Thread pepe
Hi, I am working on a mobile app that sends a post with a file (a picture) "embedded" in the body of the request. It is not inside a parameter, it is inside of the body. A simplified example of a curl statement to simulate what the request does could be this: curl -X POST my_path --data-binary my

[Rails] Re: iphone and android with RoR 3.x

2011-08-28 Thread Pepe Sanchez
Hi all Finally I think that I am going to continue working with XCode and MonoTouch for iPhone applications thank you for your advice -- 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 t

[Rails] Re: How do I change the name of a label in a form?

2011-08-28 Thread Pepe Sanchez
Thanks!! -- 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 this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+u

[Rails] How do I change the name of a label in a form?

2011-08-28 Thread Pepe Sanchez
Hi, Instead of having on the labels the field name I would like to change it some customized values. How can I change that ? Regards %= form_for(@client_workout) do |f| %> <%= f.label :client_name %> <%= f.text_field :client_name %> <%= f.label :trainer %> <%= f.text_

[Rails] iphone and android with RoR 3.x

2011-08-27 Thread Pepe Sanchez
Hi all Any advice in how to build applications for smartphones with RoR ? Regards Jose -- 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 this group, send email to rubyonrails-talk@goo

[Rails] Re: difference between <%= and <%"

2011-08-19 Thread Pepe Sanchez
Thank you all for your answers! -- 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 this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread pepe
last time but I am pretty sure that your model should 'know' somehow that it can be paginated. On Aug 19, 1:32 pm, Rahul wrote: > I was trying out the tutorials from railcast (http://railscasts.com/ > episodes/51-will-paginate) > Nothing of that sort was mentioned... > &

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread pepe
Do you have in the model something like this: cattr_reader :per_page @@per_page = your-per-page-value On Aug 19, 3:30 am, Rahul wrote: > I missed that part initially, then added the following in my > environment.rb >           config.gem 'will_paginate', :version => '~> 2.3.16 > and tried r

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread pepe
Going by memory here, but don't you have to also add something to the model to let Rails know that it can be paginated? On Aug 19, 3:30 am, Rahul wrote: > I missed that part initially, then added the following in my > environment.rb >           config.gem 'will_paginate', :version => '~> 2.3.16 >

[Rails] difference between <%= and <%"

2011-08-18 Thread Pepe Sanchez
Hi all what is the difference between <%= and <% in a view file? thanks -- 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 this group, send email to rubyonrails-talk@googlegroups.com

[Rails] Re: Question about rails generate controller

2011-08-10 Thread Pepe Sanchez
Thanks! -- 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 this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+un

[Rails] Question about rails generate controller

2011-08-09 Thread Pepe Sanchez
Hi all Is there a way to run 2 or more times the controller command to add methods to a specific controller? can I run: rails generate controller ControllerName index rails generate controller ControllerName add rails generate controller ControllerName update thanks -- Posted via http://www

[Rails] New field does now show in browser

2011-08-07 Thread Pepe Sanchez
Hi all I just added a new field phone to form _form.html.erb created with: rails generate migration AddPhoneTotickets phone:string added with rake migraiton and the new field does not show in the browser new <%= f.label :phone %> <%= f.text_field :phone %> old <%= f

[Rails] Re: Question about link_to

2011-08-07 Thread Pepe Sanchez
I understand now! To generate a link in my RoR application I just need to prefix the word "_path" with a controller name and it finds it. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group

[Rails] Re: Question about link_to

2011-08-06 Thread Pepe Sanchez
Walter, So if I understand correctly new_ticket_path, edit_ticket_path, ticket are like constants that RoR assigns to them specific values. If I want to create a new link on my RoR Application to a new page called for example "myblog", and add it to the index page, which will be the right synt

[Rails] Question about link_to

2011-08-06 Thread Pepe Sanchez
Hi all I am working on the first application from the book "Head First Rails" called "tickets". What I do not understand is where the variable "new_ticket_path" gets populated in the view index.html.erb <%= link_to 'New Ticket', new_ticket_path %> Please advise -- Posted via http://www.ruby-

[Rails] Re: Duplicate Record Detection

2011-07-11 Thread pepe
ll.http://en.wikipedia.org/wiki/User:Ipeirotis/Duplicate_Record_Detection > > > > > > > > On Mon, Jul 11, 2011 at 4:17 PM, pepe wrote: > > I don't believe you're going to find a magic formula for what you're > > suggesting. The same thing could be

[Rails] Re: Duplicate Record Detection

2011-07-11 Thread pepe
> merges them. > > > > > > > > On Mon, Jul 11, 2011 at 12:25 PM, pepe wrote: > > validate_uniqueness_of might be of help? > > > On Jul 10, 6:21 pm, Justin Stanczak wrote: > > > How are others doing duplicate record detection? I'm not findi

[Rails] Re: Duplicate Record Detection

2011-07-11 Thread pepe
validate_uniqueness_of might be of help? On Jul 10, 6:21 pm, Justin Stanczak wrote: > How are others doing duplicate record detection? I'm not finding very many > solutions, or methods online. I found one called SimString, but not much > else. I was wondering how others are detecting duplicates.

[Rails] Re: Sorting Text in ROR

2011-06-30 Thread pepe
If I were you I would add a new column PLAIN_NAME or similar and I would strip everything out everything you don't want in the name and then sort by it. I think it would remove the complexity. You can populate the new column with a before_save callback. On Jun 10, 10:59 am, Runa wrote: > While so

[Rails] Re: Ruby Metaprogramming

2011-05-13 Thread pepe
On May 13, 1:41 am, Mike Disuza wrote: > Hi, > I am working with a project where I am writing the following code:- > > store_fb_other_information(profile_obj, "activity", fb_activities, > provider, :activity, profile_obj.activity_information, > ActivityInformation) > #Book Information > store_fb_o

[Rails] Re: Autocomplete plugin

2011-05-11 Thread pepe
If I understand well the question the answer should be yes. If what you mean is if it is possible to use one field on a page to find data in more than one column in the table it should be possible the only thing you would need is to query the table by the columns you desire to query on. On May 10,

[Rails] Re: Getting null value when it's assigned

2011-05-11 Thread pepe
I'm assuming the problem happens when creating new records. Can we see the new and create actions in your controller and the full form in the view? Also, are there any before/after/around filters and/or callbacks that could be affecting the behavior of the application? On May 10, 8:19 pm, "Tomas R

[Rails] Re: Constants and Configurations

2011-05-09 Thread pepe
I believe I know what you are trying to ask. I had to setup something similar for an application of mine. I have one table with one column for each value type (boolean_value, string_value, integer_value, decimal_value and datetime_value) and a 'code' column for values such as 'timeout minutes'. In

[Rails] Re: Devise - Authenticate based on IP

2011-05-04 Thread pepe
Just a question... I am assuming the IP addresses will always be static? On May 3, 4:09 am, jack koh wrote: > I want restrict only certain IPs can to access my App. > After authenticate IPs, username and password just allows user to > access. > > -- > Posted viahttp://www.ruby-forum.com/. -- Yo

[Rails] GEMFile gem 'mysql2' and mysql version is 4.1.2

2011-04-20 Thread Pepe Sanchez
Hi all I have a Gemfile with this value gem 'mysql2' but when I run this command '$ bundle install' on my host they said that "The command "bundle install --local" seems to be returning mysql2 dependency error now. Unfortunately mysql2 gem requires mysql 5.1+ ( refer: https://github.com/brian

[Rails] Re: Communication between two apps?

2011-03-31 Thread pepe
On Mar 30, 10:10 am, Heinz Strunk wrote: > Hey folks, > > I have two different Rails apps and I would like t o sync the user > databases. What's the best way to do that? I thought of whenever someone > registers with one app the user information is posted to the other app > and vice versa. What wo

[Rails] Re: How to deserialize an array from XML

2011-03-28 Thread pepe
On Mar 27, 10:18 am, pepe wrote: > On Mar 26, 1:24 pm, Gustavo de Sá Carvalho Honorato > > wrote: > > Hi, > > > to serialize an array to xml we can use: > > > an_array = [ 1, 2, 3] > > an_array.to_xml > > > But to I can't find a way to

[Rails] Re: How to deserialize an array from XML

2011-03-27 Thread pepe
On Mar 26, 1:24 pm, Gustavo de Sá Carvalho Honorato wrote: > Hi, > > to serialize an array to xml we can use: > > an_array = [ 1, 2, 3] > an_array.to_xml > > But to I can't find a way to convert back XML to array. I didn't find a > method Array.from_xml like Hash.from_xml. > > Any ideas? I have n

[Rails] Re: how to rescue this exception

2011-03-21 Thread pepe
> >> [...]but i do not know why nearly > >> all the examples in the book re-raise the > >> exceptions.i think i have misunderstood the exception in ruby.if an > >> exception raises in the end used method,we generally do a final > >> capture,and no need to reraise,am i right? > > > You are right. C

[Rails] Re: how to rescue this exception

2011-03-19 Thread pepe
> [...]but i do not know why nearly > all the examples in the book re-raise the > exceptions.i think i have misunderstood the exception in ruby.if an > exception raises in the end used method,we generally do a final > capture,and no need to reraise,am i right? You are right. Catching and re-raisi

[Rails] Re: CMS (Content Management System) based on RoR

2011-03-09 Thread Pepe Sanchez
Sorry I means CMS (Content Management System) -- 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 this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this gro

[Rails] CMM based on RoR

2011-03-09 Thread Pepe Sanchez
hi all What CMM based on RoR do you recommend that will allow me to add my own RoR forms? thanks -- 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 this group, send email to rubyonrail

[Rails] Re: Comment creer un formulaire maitre-detail

2011-03-08 Thread Pepe Sanchez
Sorry! I made a mistake, I should write this post in the French forum. Please remove it from this group!!! -- 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 this group, send email to

[Rails] Comment creer un formulaire maitre-detail

2011-03-08 Thread Pepe Sanchez
Salut a tous! Est-il possible de creer un formulaire maitre-detail? J'ai besoin de creer une fenetre ou l'utilisateur rentre un commande et les differents produits associaes a cette commande. Puis-je afficher le tout dans une seule page? Faut-il un minimum de 2 pages Comment visualiser le deta

[Rails] Master detail forms and reports

2011-03-07 Thread Pepe Sanchez
Hi all I need to create a data entry form that will follow the master-detail structure and then I need to show a report where the user selects a record and it displays a parent/child relationship between two tables on the screen. Any suggestions of where I can find a template or an application th

[Rails] Re: Hide/Show Div and link_to_remote

2011-02-16 Thread pepe
> Lets ignore the 'editable' form part.  In general how would I hide/ > show a div on a button click for instance? In addition to what Walter mentioned there is the 'toggle' function: http://api.prototypejs.org/dom/Element/toggle/ -- You received this message because you are subscribed to the Go

[Rails] Re: how to set default_scope for the whole application?

2011-02-04 Thread pepe
> > I want is to set > > default_scope :order => 'created_at ASC' > > for all models on default. How is that done? If you want to do this no matter what I think there should be a way to do it at initialization. If you are using Rails 2.3.x you might be able to do it in 'new_rails_defaults.rb' in f

[Rails] Re: how to set default_scope for the whole application?

2011-02-02 Thread pepe
On Feb 2, 2:00 pm, Slava Mikerin wrote: > I want is to set > default_scope :order => 'created_at ASC' > for all models on default. How is that done? I might be wrong but unless you don't have IDs in your tables what you are trying to do is equivalent to leaving things as they are since the IDs ar

[Rails] Re: has many through and STI

2011-01-28 Thread pepe
Not fully understanding your problem, have you tried named_scope? On Jan 26, 9:50 am, Rodrigo Pavano wrote: > Hello! > > Im using ruby 1.9.2 and Rails 3.0.3. > > I have the following models > > class Property < ActiveRecord::Base > class Feature < ActiveRecord::Base > class DefaultFeature < Featu

[Rails] Re: Rails: Developing on Win7?

2011-01-22 Thread pepe
I have been developing in Windows for a while now and it's true that there is no much support or love for it in the RoR world. If you really want to keep going with Windows, though, if I were you I would get the rubyinstaller and DevKit right away from http://rubyinstaller.org/downloads. To instal

[Rails] Re: find_or_create : how to know the resulting operation ?

2011-01-06 Thread pepe
Just a thought. Maybe you can use a call back before the record is saved to set up a virtual attribute based on the result of new_record? On Jan 5, 3:52 am, Fabrice Fabrisss wrote: > hello, > > find_or_create_by has a different behaviour according to the existence > of the instance in the databas

[Rails] Re: Saving records from multiple tables

2010-12-23 Thread pepe
> You say to use a transaction... I already am using a transaction! Sorry about that. I obviously didn't read carefully your post. > The issue is that if the person save succeeds and the client save > fails then the transaction is rolled back fine. However the person > record now has a person.id

[Rails] Re: Saving records from multiple tables

2010-12-23 Thread pepe
I see 2 things that might help you. On one hand you could use accepts_nested_attributes_for in your person model and fields_for in your view, then you would only need to save the person and that would take care of the client as well but based on what I see in your code that might not be feasible. O

[Rails] Re: unpacking ruby-odbc

2010-12-21 Thread pepe
> Bundler might help here. I don't know bundler but for what I read in the web site it would only help with the list of gems not with unpacking ruby-odbc. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email

[Rails] Re: unpacking ruby-odbc

2010-12-20 Thread pepe
> What 'native extensions' means is that parts of the gem are not > written in Ruby but are (generally I think) in C. These need to be > compiled to generate code suitable for the OS the app is being run on. Yes, I learned that by working with ruby-odbc. >  The gem cannot therefore be frozen as i

[Rails] Re: unpacking ruby-odbc

2010-12-20 Thread pepe
> > I need to install my application to a Windows server > > My goodness, why?  That's just asking for trouble. We've had this conversation more than once. > Right.  Gems with native extensions generally can't be frozen usefully. Well, that does not help me much. If it can be done I'd like to tr

[Rails] unpacking ruby-odbc

2010-12-19 Thread pepe
the regular way, which DevKit builds correctly. I can run the application with the gem "in the open". Then when I unpack the gem everything seems to work, I get the message "Unpacked gem: ‘C:/Pepe/Code/RoR/afm/vendor/gems/ruby-odbc-0.2’", but after I uninstall the 'regu

[Rails] Re: ORA-12514: TNS:listener d oes not currently know of service requested in connect descriptor (OCIEr

2010-12-15 Thread pepe
> after some search related to the error I happen to check this link > "http://www.ruby-forum.com/topic/96884"; and followed the procedures but > now I am stuck with the below error > > C:\Documents and > Settings\SawanKumar.Thammadi\RubyOnRails\datamanger>rake db:migrate > (in C:/Documents and >

[Rails] Re: ORA-12514: TNS:listener d oes not currently know of service requested in connect descriptor (OCIEr

2010-12-15 Thread pepe
> ORA-12514: > TNS:listener d > oes not currently know of service requested in connect descriptor > (OCIError) Just a guess... Is it possible that your database name is misspelled compared to the contents of TNSNAMES.ORA? -- You received this message because you are subscribed to the Google Grou

[Rails] Re: created_at, updated_at and MSSQL

2010-12-14 Thread pepe
> Use created_at.localtime.strftime( ) Couldn't have been any easier. Thanks Colin. -- 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...@googlegroups.com. To unsubscribe from this gro

[Rails] Re: created_at, updated_at and MSSQL

2010-12-14 Thread pepe
> So there is never any ambiguity about timestamps in the database.  For > example, suppose you move to a server in another timezone, it can get > very messy if you have timestamps in EST or whatever happens to be > your local timezone today.  By keeping all timestamps in the db in UTC > you will

[Rails] Re: created_at, updated_at and MSSQL

2010-12-13 Thread pepe
> The value in the db should be UTC, so may be correct, dependent on > where you are. Thanks Colin, I am in the US, EST. UTC is 5 hours ahead of me (rake time:zones:all). For a multiple time zone application I understand that having UTC would be "the" option. Is there a reason I am not aware of w

[Rails] Re: created_at, updated_at and MSSQL

2010-12-13 Thread pepe
Thanks, the time_zone value in environment.rb is the reason this is happening. On Dec 13, 5:05 pm, Anton Anykeyev wrote: > check timezone settings in your environment configs > > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Gro

[Rails] created_at, updated_at and MSSQL

2010-12-13 Thread pepe
Hello, Sorry if this is a double post. I think I did something wrong with the original one. I am running into a little problem with the fields mentioned above. The difference between what Rails is saving in the DB and what I can see in the console is of about 5 hours. Am I missing something obvi

[Rails] created_at, updated_at and MSSQL

2010-12-13 Thread pepe
Hello, I am running into a little issue. There is a considerable time difference between the time that the console is giving me and the time I am seeing in the created_at and updated_at column in the DB. The difference is about 5 hours. I don't think the problem is in the DB, but I could be wrong

[Rails] Re: Which RoR to run on Mac OS X for a particular RoR app.

2010-12-07 Thread pepe
That probably means that you need a C compiler or DevKit so the install command can build the gem. On Dec 7, 6:27 pm, Rob Th wrote: > Shoot. What the heck is this > > sudo gem install sqlite3-ruby -v 1.2.4 > Password: > Building native extensions.  This could take a while... > ERROR:  Error insta

[Rails] Re: Which RoR to run on Mac OS X for a particular RoR app.

2010-12-07 Thread pepe
> One remaining glitch. > > "About your application’s environment: > > MissingSourceFile in Rails/infoController#properties > > no such file to load -- sqlite3 > RAILS_ROOT: /Users/rob/hello222 > > Is this a missing sqlite gem? I believe it could be. Try loading the gem and see what happens, you c

[Rails] Re: Which RoR to run on Mac OS X for a particular RoR app.

2010-12-07 Thread pepe
> Is there a way to run gem in verbose mode to see what is going on? maybe gem (un)install your_gem_here -V? The flag -V (that's the uppercase letter) tells the command to be 'verbose'. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] Re: Which RoR to run on Mac OS X for a particular RoR app.

2010-12-07 Thread pepe
> Never, this is the one and only rails app ever. I do want to get 1.8.7 > on this machine and rails 2.2.2 to match the source machine. > > I would actually like to eventually find a programmer to convert it off > rails. If you are thinking about getting a programmer anyway maybe it might be wiser

[Rails] Re: Which RoR to run on Mac OS X for a particular RoR app.

2010-12-07 Thread pepe
> How, I tried the > RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.8 > > Select gem to uninstall: >  1. rails-2.3.8 >  2. rails-2.3.8 >  3. All versions> 3 > > Remove executables: >   rails > > in addition to the gem? [Yn] > Removing rails > Successfully uninstalled rails-2.3.8 > Remove executabl

[Rails] Re: Proper way to back out a bad migration?

2010-12-07 Thread pepe
> Typically I do rake db:migrate VERSION=0 > But that  also gave me the same error about "Primary key is not allowed in a > has_and_belongs_to_many join table" > > So I then fired up dbconsole and manually dropped the table. > > But now I even if I run rake db:migrate the join table isn't created -

[Rails] Re: Which RoR to run on Mac OS X for a particular RoR app.

2010-12-07 Thread pepe
> RobsMacAir:~ rob$ gem uninstall my_gem -v=2.3.8 > ERROR: While executing gem ... (Gem::InstallError) >Unknown gem my_gem = 2.3.8 Sorry, I forgot to tell the group to e-mail me updates on the post. I'm sorry, Colin is right, what I wrote was just an example. > I expected after deinstalling

[Rails] Re: fields_for and one out of many from association

2010-12-06 Thread pepe
Never mind. I think I got it. -- 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...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups

[Rails] fields_for and one out of many from association

2010-12-06 Thread pepe
class Person < ActiveRecord::Base has_many :addresses has_one :primary_address, :class_name => 'Address', :order => 'preferred desc, id' accepts_nested_attributes_for :addresses, :allow_destroy => true accepts_nested_attributes_for :primary_address, :allow_destroy => true end class Addres

[Rails] Re: Which RoR to run on Mac OS X for a particular RoR app.

2010-12-06 Thread pepe
To uninstall a gem version you have 2 options: a) Declare the version at the end of the uninstall command: gem uninstall my_gem -v=x.x.x (You replace the 'x.x.x' with the version you want to remove, OR b) Run the uninstall command without version specified: gem uninstall my_gem Option b) will pro

[Rails] Re: Windows new installation - Always problems

2010-12-06 Thread pepe
> Then do what we're doing here: use a separate *nix server for the Rails > app, and connect with TinyTds.  That way Rails and MSSQL both get the > environment in which they're happiest. That's exactly the idea I had in mind but... it was not well received. -- You received this message because y

[Rails] Re: Windows new installation - Always problems

2010-12-06 Thread pepe
> Many will dis it but I have found Instant Rails well suited to exactly > that (if you have to work in windows).  The latest version of Instant > Rails is old and uses Rails 2.0 or so it can be upgraded using gems > (look on this list for problems with that other have had) to at least > 2.3.  I do

[Rails] Re: Windows new installation - Always problems

2010-12-06 Thread pepe
> > I looked into JRuby some time ago. What would that buy me in > > relationship to 'packaging' the application? > > Well, you could compile the whole thing as a WAR file and deploy it as a > Java servlet.  Glassfish supposedly gets you similar benefits without > needing to compile. > > I don't us

[Rails] Re: Windows new installation - Always problems

2010-12-06 Thread pepe
> Rails doesn't ever "just work" on Windows, does it? :) > > Although I have never done it I know that Rails can be frozen into the > > application. I am wondering if I can do the same thing with other > > gems. I have found this (http://gemsonrails.rubyforge.org) that seems > > to be what I need

[Rails] Windows new installation - Always problems

2010-12-06 Thread pepe
I would like to know if there is a way to 'package' an application with all the associated gems and ship it to a new server and having it to "just work" in a Windows environment. Although I have never done it I know that Rails can be frozen into the application. I am wondering if I can do the same

[Rails] Re: Update div with Prototype

2010-12-01 Thread pepe
> The title variable is to change the title when the page is refreshed. I believe you are a little lost about how the whole thing works. At first you said you wanted to change the contents of 'datos' but now you say you want to change the contents of the tag . I'll assume from now on it is the lat

[Rails] Re: Update div with Prototype

2010-12-01 Thread pepe
Hi, I have not used Rails 3 yet and I see by your link_to helper that's what you are using. Sorry if I can't be of much help, but I'll try to point out what I see here that _could_ be wrong. div class="menu_activado"> <% = link_to "Link", about_path,: remote => true%> I am assum

[Rails] Re: Update div with Prototype

2010-11-30 Thread pepe
I might be blind, but I can't see a tag anywhere. I think your snippet should also contain controller code to be able to see what might be going on. On Nov 30, 5:33 am, "Alberto B." wrote: > I want to update a div on my page with prototype (new Ajax.Updater > ('my_div', 'page.html')). > What I d

[Rails] Re: How Rails handles database connection in the background??

2010-11-30 Thread pepe
A quick search for 'rails database timeout' brought this, but it's from 2006. Check the final answer: http://wooga.drbacchus.com/rails-and-mysql-timeouts On Nov 30, 12:28 pm, "Anusuya R." wrote: > I am trying show controller specific pages in my rails app when the > database connection goes away

[Rails] Re: how to 'delete' an object from an association collection in-memory only

2010-11-30 Thread pepe
If I understand you correctly you only need to remove the association's array element. That will not delete the underlying DB record if there is one. On Nov 30, 3:13 pm, Lille wrote: > Hi, > > My Rails app offers opportunities to try out models on a 'what-if' > basis, where dependent associations

[Rails] Re: Dependency Problem

2010-11-30 Thread pepe
Do you remember the version of the gem(s) you had before you updated them? There is a way to install specific gem versions by adding the version at the end of the install command. Something like this: gem install rails -v=2.3.5 # This would install Rails 2.3.5 You can also check the dependencies

[Rails] Re: How to get all models,controller,action and method names

2010-11-29 Thread pepe
> >       # This creates an anonymous singleton class in which I declare >       # a public method that accesses private method 'action_methods', >       # which returns the controller actions >       class << controller >         def my_action_methods >           action_methods >         end >  

[Rails] How to get all models,controller,action and method names

2010-11-29 Thread pepe
Answering the following post that I could not (did not know how to) re- open: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/6d9a5679d73b0a6b/d17adc61119d2acc?lnk=gst&q=All+controllers%27+action+names#d17adc61119d2acc I have been working on getting a list of all actions in e

[Rails] Re: How to create a mail service like gmail using ror

2010-11-28 Thread pepe
> Actually i am a bit new to the development side. > and new to ror as well.but i want to learn Ruby on Rails and start my > web development. i want to build a real time application while > learning..can u guide me pls... Hi there, First of all I would get familiar with Ruby, which is VERY import

[Rails] Re: select helper with boolean and null/nil values

2010-11-20 Thread pepe
Hi David, Can you post your application in a different format? I need a C compiler to install bzip2 and I'd rather not go into all that. Thanks. -- 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 rubyon

[Rails] Re: select helper with boolean and null/nil values

2010-11-20 Thread pepe
> At that point, you *did* need it.  Ugly or repetitive code is an example > of a need -- in this case, for refactoring or generalization. There might have been a 'personal' need but I don't think that makes it a *real* need. The ugly code was just the way it is done. Changing it was like saying "

[Rails] Re: select helper with boolean and null/nil values

2010-11-19 Thread pepe
> Personal experience is valuable, but you can't always know that this > design will be just like the last one. I don't think about it as a matter of design but just common sense in most cases. I'll explain later. > > I'd rather spend 30 or 60 extra minutes > > giving a universal solution to a pr

[Rails] Re: select helper with boolean and null/nil values

2010-11-19 Thread pepe
Hi David, I haven't looked at your code, I was just trying to offer a possible reason/solution to keep you going. I'll try to take a look asap but I'm busy right now. However, I am using true/false in an HTML select and it works fine for me. On Nov 19, 12:59 pm, David Cross wrote: > Ok... lets b

[Rails] Re: select helper with boolean and null/nil values

2010-11-19 Thread pepe
> > Why do I think boolean columns are a little different? You could > > interpret that null is 'similar' to false because it is not true, > > But I'm not.  I think SQL has it right: null is neither false nor true. Out of context. I never said it was and 'you' meant 'anybody'. Sorry if it was misl

  1   2   3   4   5   >