[Rails] Reports in rails app

2010-08-13 Thread Jarl Friis
Hi. I am looking for some reporting library for rails. Does anyone have experience with such libraries, until now I have found * Ruport (Ruby reports) (http://www.rubyreports.org/) * reportable (http://github.com/saulabs/reportable) * ReportBuilder

[Rails] Re: Problem with changing from mySql to PostrgreSql with rails

2010-08-13 Thread Mohammed Alenazi
There is still a problem. @users = User.paginate :joins = :properties ,:select = 'distinct users.*', :page = params[:page], :order = 'properties.id DESC',:conditions = ['users.id != 1'] I got this error message. ActiveRecord::StatementInvalid (PGError: ERROR: for SELECT DISTINCT, ORDER BY

[Rails] Re: ORM Designer and Ruby ORM

2010-08-13 Thread Ludek Vodicka
Thank you both for your replies. I will look to AR and DM too. If anyone has another idea or comment about ORMD and RoR, please feel free to send me your opinion. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Ruby PRAWN PDF generatiog values from controller

2010-08-13 Thread Jeffrey Bonson
I have a file named report.pdf.prawn, which is the view part of my PDF file where we can edit the contents of the PDF file like pdf=Prawn::Document.new(:page_layout =:landscape,:page_size = 'A4') pdf.textHello he...@headers headers=[],[] pdf.table headers, :width = 768, :size = 11, :border_style

[Rails] Re: Merb configuration options in rails3

2010-08-13 Thread arai
While your alias suggestion is cute, it's not exactly what I had in mind. My organization has a dev server that runs nginx on port 80 and reverse proxies to multiple merb and rails instances at higher ports (100XX) on the same box. Not all of these instances are always running at the same time,

[Rails] uninitialized constant Error for CalendarHelpper

2010-08-13 Thread Tsuyoshi Takahashi
After installing calendar_helper-0.2.3 gem, application using CalendarHelper works fine. Then I tried to test using rake command which gave me the following error. Why does these messages appear evenif the application owrks fine. -- Error Messags

[Rails] Re: Ruby PRAWN PDF generatiog values from controller

2010-08-13 Thread javinto
Hi, Use the :column_widths={0=100,1=100, 2=100, etc..} property. Jan On Aug 13, 9:27 am, Jeffrey Bonson li...@ruby-forum.com wrote: I have a file named report.pdf.prawn, which is the view part of my PDF file where we can edit the contents of the PDF file like

[Rails] Re: Ruby PRAWN PDF generatiog values from controller

2010-08-13 Thread Jeffrey Bonson
I used the :column_widths property before, since the Header field comes in as hash values, te :column_widths of 0=100 will be assigned to the first header only, the remaining cell widths will not be taken. What i was asking, is the format to be printed on PDF. thanks for replying. javinto

[Rails] Plugin i18n rails for netbeans 6.9

2010-08-13 Thread Luis Zandonadi
hi friends, I developed a netbeans plugin to edit yml configuration files in a ruby on rails projects Just see my blog to more informations http://luiszandonadi.heroku.com/en/articles/netbeans/2010-07-11-i18n-rails-with-netbeans Thanks. -- You received this message because you are subscribed

[Rails] [ANN] jquery_rails3 beta 2 released

2010-08-13 Thread Allan Davis
I have released the jquery_rails3 gem beta 2. This gem is a rails3 generator to add the jquery rails.js and jquery to an rails app. To install: gem install jquery_rails3 --pre To add jquery inside a rails3 app: rails g jquery_install if you do --ui --components=dialog tabs It will install the

[Rails] sharing cookies for dyanmic domain

2010-08-13 Thread atin
Hi folks, i have two websites example.com and a mob version m.example.com so waht i want is that if a user is logged in example.com then when he switches to m.example.com he wont have to login again Is there any method that anyone can suggest i have tried with some techniques available on net

[Rails] [ANN] rails3-maven-plugins and more

2010-08-13 Thread mkristian
hello, there is new version for the people who know maven from their former life and want to explore how to use it to manage ruby and/or rails projects with maven. you can generate a mavenized rails3 application: http://blog.mkristian.tk/2010/03/riding-ruby-on-rails3-with-maven.html (for

[Rails] Re: How to test routes urls in console

2010-08-13 Thread Erwin
sure, but my question was related to the 'console' ... and last Rails version .. Rails 3 thanks for this link ,I'll keep it in a safe place On 12 août, 16:31, pepe p...@betterrpg.com wrote: A quick Google search would have yielded this:http://blog.zobie.com/2008/11/testing-routes-in-rails/

Re: [Rails] Re: configuration to set username optional during signup

2010-08-13 Thread Colin Law
On 12 August 2010 23:08, Marnen Laibow-Koser li...@ruby-forum.com wrote: Robert Walker wrote: [...] We really need to migrate away from the username/password INSANITY. What insanity?  What the heck is wrong with the current system, other than that it's worked for decades and can no longer be

Re: [Rails] establish_connection not honored by db:migrate

2010-08-13 Thread Colin Law
On 13 August 2010 00:08, Fearless Fool li...@ruby-forum.com wrote: Short form: How can I convince migrate to create or modify tables in a database other than the current one?  In other words, how can I get migrate to honor establish_connection :external in a model definition? Details: I have

[Rails] Re: Re: MySQL not Connected ...... *pull hair*

2010-08-13 Thread Alan k Fadliawan
RailsFan Radha wrote: looks like the link didn't get thru.. here it is http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll I have the same problem. At the first time I used libmysql.dll file from my XAMPP directory but the problem still appears.

Re: [Rails] [Rails 3] How to test routes urls in console

2010-08-13 Thread Colin Law
On 12 August 2010 08:14, Erwin yves_duf...@mac.com wrote: I tried require 'url_writer' but this is not the trick what should be required/included to test the routes urls ? What do you mean by testing the routes urls (in console)? By the way it is a good idea to be explicit in the text of

[Rails] Re: Re: MySQL not Connected ...... *pull hair*

2010-08-13 Thread Alan k Fadliawan
RailsFan Radha wrote: looks like the link didn't get thru.. here it is http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll I have the same problem. At the first time I used libmysql.dll file from my XAMPP directory but the problem still appears.

[Rails] Re: help with installing rails with ruby gems

2010-08-13 Thread Jerome Fillioux
Hi Rich, there is several things to say about your question : 1) if, like I think, your running VirtualRails, you DON'T have to install Ruby, SQLite, RubyGems and Rails : they ARE ALREADY INSTALLED that is all the interest of using VirtualRails : all is there, you just have to start développing

[Rails] Re: Help geting started

2010-08-13 Thread neigaard
Well, I am now reading http://guides.rubyonrails.org/getting_started.html (also tried Agile Web Development with Rails), but I do not get very far. I follow the guide to chapter 4.1, but when I point my browser to http://localhost:3000/home/index I get a blank page and the following in

[Rails] Databases allow bad foreign keys from Rails Fixtures

2010-08-13 Thread Jaime Ferreira
Hi, I am using Rails Fixtures to load some test data to my database and accidentally I introduced a foreign key out of range. To my surprise, the database accepted it despite having referential integrity constraints (that work). I tried with PostgreSQL and with MySQL InnoDB and both allowed.

Re: [Rails] Scaffolding working...kinda

2010-08-13 Thread Will Merrell
Scott Le gendre wrote: Hello all. I've been working through some online tutorials, learning ROR and have a question on scaffolding. Through the command promt i've ran the command: $ script/generate scaffold Albums [snip] So, the question is, why isnt it filling out the code I had expected? I

[Rails] Re: Databases allow bad foreign keys from Rails Fixtures

2010-08-13 Thread Jaime Ferreira
Thank you Tony. Mistery solved, looks like there is nothing to worry about, I only have to be careful loading the test data. -- 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

Re: [Rails] Why do I get the DEFAULT rails page

2010-08-13 Thread Daniel Bye
On Fri, Aug 13, 2010 at 03:26:58PM +0200, Abder-Rahman Ali wrote: I'm following the tutorial here: http://edgeguides.rubyonrails.org/getting_started.html And have set the route as: root :to = home#index But, always get the DEFAULT Rails page. What could I be missing? You didn't

Re: [Rails] Re: Help geting started

2010-08-13 Thread jason white
you can also take a look at this http://railstutorial.org/book http://railstutorial.org/bookas far as you environment being broken that's hard to tell without more information On Fri, Aug 13, 2010 at 5:21 AM, neigaard sneiga...@gmail.com wrote: Well, I am now reading

Re: [Rails] Re: Problem with changing from mySql to PostrgreSql with rails

2010-08-13 Thread Hassan Schroeder
On Thu, Aug 12, 2010 at 11:25 PM, Mohammed Alenazi vb4...@gmail.com wrote: There is still a problem. �...@users = User.paginate :joins = :properties ,:select = 'distinct users.*', :page = params[:page], :order = 'properties.id DESC',:conditions = ['users.id != 1'] I got this error message.

[Rails] Re: Why do I get the DEFAULT rails page

2010-08-13 Thread Abder-Rahman Ali
Daniel Bye wrote: On Fri, Aug 13, 2010 at 03:26:58PM +0200, Abder-Rahman Ali wrote: I'm following the tutorial here: http://edgeguides.rubyonrails.org/getting_started.html And have set the route as: root :to = home#index But, always get the DEFAULT Rails page. What could I be

[Rails] Re: Scaffolding working...kinda

2010-08-13 Thread Scott Le gendre
So use it to get started, but then be prepared to do the work your self. Will, thanks for the comments and fully noted! I'm doing a tutorial through lynda.com titled Ruby on Rails Essential Training. The tutorial is really great, but severely outdated. The tutorial goes through building all

[Rails] Re: Databases allow bad foreign keys from Rails Fixtures

2010-08-13 Thread Marnen Laibow-Koser
Tony Byrne wrote: Hi Jaime, On 13 Aug 2010, at 11:49, Jaime Ferreira wrote: How is it possible that the fixtures loading go around my database constraints? For PostgreSQL AFAIK, the triggers which enforce RI are disabled prior to the loading of the fixtures. I only discovered this

[Rails] Re: How to test routes urls in console

2010-08-13 Thread pepe
The link explains how to test in the console. Not sure if the example will work with Rails 3 but my guess is that it will. Rails 3 was never mentioned in the OP. ;) On Aug 13, 5:03 am, Erwin yves_duf...@mac.com wrote: sure, but my question was related to  the 'console' ...  and last Rails

[Rails] Re: Re: configuration to set username optional during signup

2010-08-13 Thread Marnen Laibow-Koser
Colin Law wrote: On 12 August 2010 23:08, Marnen Laibow-Koser li...@ruby-forum.com wrote: Robert Walker wrote: [...] We really need to migrate away from the username/password INSANITY. What insanity? �What the heck is wrong with the current system, other than that it's worked for decades

Re: [Rails] Re: Why do I get the DEFAULT rails page

2010-08-13 Thread Colin Law
On 13 August 2010 14:59, Abder-Rahman Ali li...@ruby-forum.com wrote: Daniel Bye wrote: On Fri, Aug 13, 2010 at 03:26:58PM +0200, Abder-Rahman Ali wrote: I'm following the tutorial here: http://edgeguides.rubyonrails.org/getting_started.html And have set the route as: root :to = home#index

[Rails] Re: Databases allow bad foreign keys from Rails Fixtures

2010-08-13 Thread Jaime Ferreira
Thanks Marnen. Rails has a lot to improve, especially in the relational database area but I think it's in the right way. I will check out Machinist as you recomend. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: SQL/Paginate help needed for has_many :through relationship

2010-08-13 Thread Raphael Costa
Anthony Crumley wrote: Max, How about something like... :order=(CASE WHEN tags.name = 'piano' THEN 1 ELSE 0 END) desc, tags.name, Anthony Crumley http://commonthread.com Hi Max! I have the same problem of this post http://www.ruby-forum.com/topic/207831 How did you solve that?

[Rails] The ideal RoR environment

2010-08-13 Thread Bob
I'm currently taking some time to re-examine my environment and wanted to get the input from the minds that read these forums in an attempt to piece together an ideal RoR environment. I'm trying to break out each necessary aspect of a project and get thoughts and opinions on what people think is

Re: [Rails] The ideal RoR environment

2010-08-13 Thread Peter De Berdt
On 13 Aug 2010, at 17:34, Bob wrote: Testing - Cucumber, RSpec, and ApacheBenchmark. Using Cucumber for the high-level tests and RSpec for low-level ones and AB for load- testing. I was one of the people that learned Ruby and Rails and ignored the testing features for a long time but I'm on

Re: [Rails] The ideal RoR environment

2010-08-13 Thread Michael Pavling
On 13 August 2010 16:34, Bob rpell...@gmail.com wrote: Version-Control - I currently use SVN, but would be interested in hearing arguments for learning Git. SVN is a nightmare when working in teams, remotely, or trying to be agile. You can *make* it work, but only because you change your

[Rails] Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Bob wrote: I'm currently taking some time to re-examine my environment and wanted to get the input from the minds that read these forums in an attempt to piece together an ideal RoR environment. I'm trying to break out each necessary aspect of a project and get thoughts and opinions on what

[Rails] Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Bob wrote: I'm currently taking some time to re-examine my environment and wanted to get the input from the minds that read these forums in an attempt to piece together an ideal RoR environment. I'm trying to break out each necessary aspect of a project and get thoughts and opinions on what

Re: [Rails] Re: The ideal RoR environment

2010-08-13 Thread Michael Pavling
On 13 August 2010 17:05, Marnen Laibow-Koser li...@ruby-forum.com wrote: Rails is a Web framework.  Word and Excel documents have no place on the Web -- they do not work well as interchange formats or play nicely with Web browsers.  Do not design your Web applications in such a way that Word

[Rails] Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 13 August 2010 16:34, Bob rpell...@gmail.com wrote: Version-Control - I currently use SVN, but would be interested in hearing arguments for learning Git. SVN is a nightmare when working in teams, remotely, or trying to be agile. You can *make* it work, but only

[Rails] Re: Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 13 August 2010 17:05, Marnen Laibow-Koser li...@ruby-forum.com wrote: Rails is a Web framework. �Word and Excel documents have no place on the Web -- they do not work well as interchange formats or play nicely with Web browsers. �Do not design your Web applications

Re: [Rails] The ideal RoR environment

2010-08-13 Thread Edmond Kachale
2010/8/13 Peter De Berdt peter.de.be...@pandora.be On 13 Aug 2010, at 17:34, Bob wrote: Testing - Cucumber, RSpec, and ApacheBenchmark. Using Cucumber for the high-level tests and RSpec for low-level ones and AB for load- testing. I was one of the people that learned Ruby and Rails and

Re: [Rails] Re: Why do I get the DEFAULT rails page

2010-08-13 Thread Dave Aronson
On Fri, Aug 13, 2010 at 09:59, Abder-Rahman Ali li...@ruby-forum.com wrote: I actually did delete public/index.html. Colin suggests that your browser may be caching it; there may be additional levels of caching going on. AFAIK Rails doesn't automagically wanted-but-deleted default pages (like

Re: [Rails] Re: Re: The ideal RoR environment

2010-08-13 Thread Michael Pavling
On 13 August 2010 17:21, Marnen Laibow-Koser li...@ruby-forum.com wrote: If a client asks to produce the functionality to export data into the office-application format of their choice, then it's not irresponsible to do exactly that. Yes it is.  If a client asks me that, then it is my

Re: [Rails] Re: The ideal RoR environment

2010-08-13 Thread Michael Pavling
On 13 August 2010 17:18, Marnen Laibow-Koser li...@ruby-forum.com wrote: or if you want to be really cutting edge, look at Fossil (http://fossil-scm.org). How is Fossil cutting-edge? In so far as it is a moderately new development by people who have used other DVCS applications and said to

[Rails] :limit text mysql

2010-08-13 Thread Conor Nugent
I have a rails 3.rc app that I'm developing. I have a text entry in one my models that can sometimes be quite big. I tried setting :limit = 4294967296 on the text column in my migration file but this doesn't seem to have any effect. The column is till created as a TEXT column rather than

[Rails] Re: establish_connection not honored by db:migrate

2010-08-13 Thread Fearless Fool
Colin Law wrote: Am I misunderstanding your question, or is it just a matter of doing rake db_migrate RAILS_ENV=external to migrate that db? Colin Colin: your answer was *perfect* for the question I asked. Unfortunately, I'd over-simplified the question. I have *two* databases: the

[Rails] Rails 3 / ActiveModel for Credit Card information?

2010-08-13 Thread Tony
When submitting billing information in the past I've always used attr_accessor for credit card details as they should not be saved in the database. In addition I always end up storing the card expiration date so that the date form helper works correctly. With Active Model it seems logical to

[Rails] Can not get CDATA out of XML node using Nokogiri

2010-08-13 Thread David Kahn
Input appreciated: Trying to get data from a CDATA field out of an xml doc using Nokogiri. This is the node: ATTACHED_DOCUMENT ![CDATA[insert PDF code here]] /ATTACHED_DOCUMENT When I query I am getting at best empty string, where I should expect the text insert PDF

[Rails] Rails 2 and Rails 3 in the same gemset leads to errors

2010-08-13 Thread turkan
Hi. I am pretty new to ruby (and those gems) and rails.. Until now I thought that all rails application have some kind of integrated version management (RAILS_GEM_VERSION in Rails 2 and gem 'rails' in Rails 3). And therefore I thought that having Rails 2 and Rails 3 in the same gem repository (in

Re: [Rails] :limit text mysql

2010-08-13 Thread David Kahn
Conor, I think this is relevant - I had similar issue when I was saving reports to a db field. To work around, I changed the datatype of the field to :longtext. You can create or change the field to :longtext in your migration and everyone should be happy. On Fri, Aug 13, 2010 at 12:58 PM,

[Rails] Re: Can not get CDATA out of XML node using Nokogiri

2010-08-13 Thread Gary Winklosky
One way would be to check the children until you get the CData node: parent_node = xml_request_doc.xpath(//attached_document) # this assumes parent_node is not nil cdata_node = parent_node.children.detect {|n| n.cdata?} # i think you can then just do: cdata_node.value -- Posted via

Re: [Rails] Re: Can not get CDATA out of XML node using Nokogiri

2010-08-13 Thread David Kahn
On Fri, Aug 13, 2010 at 2:15 PM, Gary Winklosky li...@ruby-forum.com wrote: One way would be to check the children until you get the CData node: parent_node = xml_request_doc.xpath(//attached_document) # this assumes parent_node is not nil cdata_node = parent_node.children.detect {|n|

[Rails] Re: Re: Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 13 August 2010 17:21, Marnen Laibow-Koser li...@ruby-forum.com wrote: If a client asks to produce the functionality to export data into the office-application format of their choice, then it's not irresponsible to do exactly that. Yes it is. �If a client asks me

[Rails] Re: Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 13 August 2010 17:18, Marnen Laibow-Koser li...@ruby-forum.com wrote: or if you want to be really cutting edge, look at Fossil (http://fossil-scm.org). How is Fossil cutting-edge? In so far as it is a moderately new development by people who have used other

[Rails] Re: Re: Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 13 August 2010 17:21, Marnen Laibow-Koser li...@ruby-forum.com wrote: If a client asks to produce the functionality to export data into the office-application format of their choice, then it's not irresponsible to do exactly that. Yes it is. �If a client asks me

[Rails] Re: establish_connection not honored by db:migrate

2010-08-13 Thread Marnen Laibow-Koser
Fearless Fool wrote: [...] I've thought about how rake db:migrate works -- it modifies a database, then asks the database to reveal its new structure to build a new schema.rb. Given that, it doesn't have enough information to know which tables belong in the regular database and which

[Rails] Re: :limit text mysql

2010-08-13 Thread Conor Nugent
David Kahn wrote: Conor, I think this is relevant - I had similar issue when I was saving reports to a db field. To work around, I changed the datatype of the field to :longtext. You can create or change the field to :longtext in your migration and everyone should be happy. Hi David,

[Rails] Re: :limit text mysql

2010-08-13 Thread Marnen Laibow-Koser
Conor Nugent wrote: David Kahn wrote: Conor, I think this is relevant - I had similar issue when I was saving reports to a db field. To work around, I changed the datatype of the field to :longtext. You can create or change the field to :longtext in your migration and everyone should be

Re: [Rails] Re: Re: Re: The ideal RoR environment

2010-08-13 Thread Michael Pavling
On 13 August 2010 19:42, Marnen Laibow-Koser li...@ruby-forum.com wrote: There is no alternative to explore. Of course there is.  The application could do all the editing needed and then export the mailshots in some other format. HAL, do the mailmerge... :-) -- You received this message

Re: [Rails] Re: :limit text mysql

2010-08-13 Thread Philip Hallstrom
Conor, I think this is relevant - I had similar issue when I was saving reports to a db field. To work around, I changed the datatype of the field to :longtext. You can create or change the field to :longtext in your migration and everyone should be happy. Hi David, Thanks a

[OT] Re: [Rails] Re: Re: Re: The ideal RoR environment

2010-08-13 Thread Michael Pavling
On 13 August 2010 19:40, Marnen Laibow-Koser li...@ruby-forum.com wrote: Michael Pavling wrote: [1] I'm currently working on some PHP development, which is running on IIS and MSSQL, because some middle-manager bought an expensive server, which has to be seen to work. It's frustrating, but

[Rails] Re: Rails and Oracle - can select date but cannot save

2010-08-13 Thread Tomasz Romanowski
Found how to set the date format for DB conversion on the Rails side as opposed to Oracle. It's good but it's not enough. I put the following in overrides.rb: module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module Date #:nodoc: # Converting dates to formatted strings,

Re: [Rails] Re: What Advice Would You Give A Rails Newbie?

2010-08-13 Thread Iain Davis
On Mon, Aug 9, 2010 at 8:35 PM, Agoofin thebserv...@gmail.com wrote: I found a couple of good books, Simply Rails 2 by Lenz is my favorite. That was pleasing to me to know; I have a Books24x7 subscription, so I selected (the newest, I think) book on Rails from the selection available to me,

Re: [Rails] Re: :limit text mysql

2010-08-13 Thread David Kahn
Doesn't mysql limit varchar to 65kb or so? From mysql doc: Values in VARCHAR columns are variable-length strings. The length can be specified as 1 to 255 before MySQL 4.0.2, 0 to 255 as of MySQL 4.0.2, and 0 to 65,535 as of MySQL 5.0.3. (The maximum actual length of a VARCHAR in MySQL 5.0 is

Re: [Rails] Re: :limit text mysql

2010-08-13 Thread Dave Aronson
If you *really* need to store big stuff, maybe you could just use the db to store a filename? It will add overhead to make sure files get deleted when the record goes away, but it could work. Or maybe use a document-oriented database? -Dave -- Specialization is for insects. -RAH  | Have Pun,

Re: [Rails] Re: What Advice Would You Give A Rails Newbie?

2010-08-13 Thread Peter De Berdt
On 13 Aug 2010, at 21:05, Iain Davis wrote: Judging by your questions about template engines and user management, I'd recommend a more advanced book like The Rails Way. Would you say that The Rails Way would be a good follow up to Lenz's book? I'm about 75% through it, so I should perhaps

Re: [Rails] Re: Rails and Oracle - can select date but cannot save

2010-08-13 Thread Hassan Schroeder
On Fri, Aug 13, 2010 at 12:05 PM, Tomasz Romanowski li...@ruby-forum.com wrote: Found how to set the date format for DB conversion on the Rails side as opposed to Oracle. It's good but it's not enough. I put the following in overrides.rb:        DATE_FORMATS[:db] = %d-%b-%y This gives me ,

Re: [Rails] Re: :limit text mysql

2010-08-13 Thread David Kahn
maybe you could just use the db to store a filename From experience I would second this approach... in fact that is what I did on the app I referred to, once I put it off Heroku onto its own environ (as at least stand-alone on Heroku there is no file storage) On Fri, Aug 13, 2010 at 3:12 PM,

Re: [Rails] Re: :limit text mysql

2010-08-13 Thread Philip Hallstrom
On Aug 13, 2010, at 12:22 PM, David Kahn wrote: maybe you could just use the db to store a filename From experience I would second this approach... in fact that is what I did on the app I referred to, once I put it off Heroku onto its own environ (as at least stand-alone on Heroku there

Re: [Rails] Re: Re: Re: The ideal RoR environment

2010-08-13 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 13 August 2010 19:40, Marnen Laibow-Koser li...@ruby-forum.com wrote: Michael Pavling wrote: [1] I'm currently working on some PHP development, which is running on IIS and MSSQL, because some middle-manager bought an expensive server, which has to be seen to work.

[Rails] Re: Re: :limit text mysql

2010-08-13 Thread Marnen Laibow-Koser
Philip Hallstrom wrote: Thanks a million for your reply. I will give that a go. I had seen that that is possible but I was a bit worried that it would mean that my migrations wouldn't be database agnostic Is there a reason that you're not using VARCHAR? That should hold the data (in

Re: [Rails] Re: establish_connection not honored by db:migrate

2010-08-13 Thread Colin Law
On 13 August 2010 18:05, Fearless Fool li...@ruby-forum.com wrote: [...] I have *two* databases: the 'external' one holds static data -- it never changes as a result of my application.  The 'regular' database (dbtest_development, dbtest_test, or dbtest_production) holds data that does change

[Rails] Re: Re: establish_connection not honored by db:migrate

2010-08-13 Thread Marnen Laibow-Koser
Colin Law wrote: On 13 August 2010 18:05, Fearless Fool li...@ruby-forum.com wrote: schema.rb. �Given that, it doesn't have enough information to know which external database, but that shouldn't really matter. I suppose you could test RAILS_ENV in the migration rb file and only do the

[Rails] Re: How to query the schema of a ActiveRecord class?

2010-08-13 Thread Marnen Laibow-Koser
Fritz Trapper wrote: Thanks for your replies. Using columns, the name can be queried by human_name: Art.columns[0].human_name inspect is perfect for displaying purposes. Note that, in my experience at least, this is rarely necessary unless you're writing something like

[Rails] drag and drop image upload

2010-08-13 Thread Yogendra Singh
Is there anyway to drag the image from desktop and drop to web page and image should store in server by droping. -- 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

[Rails] Re: Re: Can not get CDATA out of XML node using Nokogiri

2010-08-13 Thread Gary Winklosky
maybe try .cdatas on the parent node rather than children. Not sure about Nokogiri but such a method exists for rexml/document. -- 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

Re: [Rails] Re: Re: Re: The ideal RoR environment

2010-08-13 Thread Bob
Wow...thanks for all of the great feedback so far. I had a feeling there were better options than SVN out there. In fact, it was when I started looking into Git that I had the idea of taking some extra time to see if other elements of my environment would also benefit from an upgrade (ie my

[Rails] Re: Re: establish_connection not honored by db:migrate

2010-08-13 Thread Fearless Fool
Marnen Laibow-Koser wrote: That seems like a terrible idea. It would put a lot of unnecessary crap in both databases. Just a clarification: my heavy-handed approach would create parallel table structures in both databases, but only the relevant tables would get populated with any data.

Re: [Rails] drag and drop image upload

2010-08-13 Thread Philip Hallstrom
Is there anyway to drag the image from desktop and drop to web page and image should store in server by droping. http://www.google.com/search?q=html5+drag+drop+file+upload -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

Re: [Rails] Re: Scaffolding working...kinda

2010-08-13 Thread Will Merrell
Scott Le gendre wrote: So use it to get started, but then be prepared to do the work your self. Will, thanks for the comments and fully noted! I'm doing a tutorial through lynda.com titled Ruby on Rails Essential Training. The tutorial is really great, but severely outdated. The

Re: [Rails] Re: Re: establish_connection not honored by db:migrate

2010-08-13 Thread Colin Law
On 13 August 2010 21:05, Fearless Fool li...@ruby-forum.com wrote: [...] Colin Law (Guest) wrote: I suppose you could test RAILS_ENV in the migration rb file and only do the migration if it is appropriate for the env specified.  Then rake db:migrate RAILS_ENV=development would apply relevant

[Rails] Re: What Advice Would You Give A Rails Newbie?

2010-08-13 Thread Bob
On Aug 13, 3:16 pm, Peter De Berdt peter.de.be...@pandora.be wrote: On 13 Aug 2010, at 21:05, Iain Davis wrote: Judging by your questions about template engines and user management, I'd recommend a more advanced book like The Rails Way. Would you say that The Rails Way would be a good

[Rails] Re: Re: Re: establish_connection not honored by db:migrate

2010-08-13 Thread Fearless Fool
Colin Law wrote: A good point, but I think it would be ok. If you test the env inside the migration class, so that for the 'wrong' db it just appears like a do-nothing migration, then I think the fact that the migration has been run should be recorded as normal and all should be well. If

[Rails] Re: Re: Why do I get the DEFAULT rails page

2010-08-13 Thread Abder-Rahman Ali
Thanks a lot everyone. It seems that it may be a cache problem. I deleted the application and created it from scratch and now it works fine. -- 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

Re: [Rails] Re: Re: Re: establish_connection not honored by db:migrate

2010-08-13 Thread Colin Law
On 13 August 2010 21:40, Fearless Fool li...@ruby-forum.com wrote: Colin Law wrote: A good point, but I think it would be ok.  If you test the env inside the migration class, so that for the 'wrong' db it just appears like a do-nothing migration, then I think the fact that the migration has

Re: [Rails] Re: Re: Why do I get the DEFAULT rails page

2010-08-13 Thread Colin Law
On 13 August 2010 21:58, Abder-Rahman Ali li...@ruby-forum.com wrote: Thanks a lot everyone. It seems that it may be a cache problem. I deleted the application and created it from scratch and now it works fine. I will remember that solution. Next time I want to clear the cache I know I just

[Rails] routes.rb

2010-08-13 Thread Abder-Rahman Ali
I'm following the tutorial here: http://edgeguides.rubyonrails.org/getting_started.html And, so far, I have the following in the routes.rb file: get home/index resources :posts root :to = home#index I know what root :to = home#index is. But, what is the use of the following, what do they mean?

[Rails] Re: Re: Re: Why do I get the DEFAULT rails page

2010-08-13 Thread Abder-Rahman Ali
Colin Law wrote: On 13 August 2010 21:58, Abder-Rahman Ali li...@ruby-forum.com wrote: Thanks a lot everyone. It seems that it may be a cache problem. I deleted the application and created it from scratch and now it works fine. I will remember that solution. Next time I want to clear the

[Rails] Rails3: Should nested ActiveModel be treated like nested ActiveRecord

2010-08-13 Thread Tony
I have an User model (ActiveRecord). It has many Addresses (ActiveRecord) and one CreditCard (ActiveModel) When I submit my nested form the CreditCard validations did not fire. So... in my User model I added this so the credit card validations would get called. def before_validation

[Rails] Link to remote and the equivalent in Rails 3

2010-08-13 Thread Ruby on Rails: Talk
Hi WOW! Is Rails 3 another interesting learning curve. Just when I think I have a general working knowledge of Rails 2 ... things change. I'm trying to replicate the following in Rails 3: %= link_to_remote image_tag(creditcard.png, :border = 0), :url = {:action = :make_payment, :type = Credit,

Re: [Rails] Re: Re: Can not get CDATA out of XML node using Nokogiri

2010-08-13 Thread David Kahn
On Fri, Aug 13, 2010 at 3:54 PM, Gary Winklosky li...@ruby-forum.com wrote: maybe try .cdatas on the parent node rather than children.  Not sure about Nokogiri but such a method exists for rexml/document. Thanks. It does work with REXML, out of the box, no fiddling. I like Nokogiri's speed but

Re: [Rails] Link to remote and the equivalent in Rails 3

2010-08-13 Thread Greg Donald
On Fri, Aug 13, 2010 at 5:17 PM, Ruby on Rails: Talk dazzaroo...@gmail.com wrote: I'm trying to replicate the following in Rails 3: %= link_to_remote image_tag(creditcard.png, :border = 0), :url = {:action = :make_payment, :type = Credit, :id = @appt.id }, :with='amount='+$F('amount'),

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-13 Thread Tony
You should probably add more information. like the routes for entries and what exactly is calling /images/test.png. On Aug 13, 6:17 pm, Ruby on Rails: Talk dazzaroo...@gmail.com wrote: Hi WOW! Is Rails 3 another interesting learning curve. Just when I think I have a general working knowledge

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-13 Thread Ruby on Rails: Talk
Thanks for the speedy reply. I've tried ... %= link_to Add Photos, :controller = :entries, :action = :showphotos, :remote = true % Which gives ... the following error: ActionView::Template::Error (No route matches {:action=showphotos, :remote=true, :controller=entries}): 6:

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-13 Thread Ruby on Rails: Talk
Oh ... And if I change it to ... %= link_to Add Photos, '/entries/ showphotos', :remote = true % I get ... Started GET /entries/showphotos for 127.0.0.1 at Fri Aug 13 23:37:45 +0100 2010 Processing by EntriesController#show as JS Parameters: {id=showphotos} Entry Load (0.2ms) SELECT

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-13 Thread Ruby on Rails: Talk
Hi The /images/test.png is nothing .. I just need to create a file (paper for swfupload and paperclip). I have the following in my routes file: resources :admin resources :countries resources :entries resources :photos Is this not enough? -- You received this message because you are

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-13 Thread Tony
Try watching this Railscast.. http://railscasts.com/episodes/205-unobtrusive-javascript I'm not sure what your entry controller is doing. If you're trying to add a photo wouldn't you be posting to the photos controller instead of doing a get on the entries controller? %= link_to Add Photos,

[Rails] Re: routes.rb

2010-08-13 Thread Tony
run rake routes and you'll see all the routes they create. comment one out and run it again to see what goes away -- 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

  1   2   >