Re: [Rails] RoR latest and PostgreSQL 9.1.3

2012-03-02 Thread Scott Ribe
On Mar 1, 2012, at 10:50 AM, Hassan Schroeder wrote: > So what's unclear about that? If you believe the required files are > on your system, find them and provide the correct path to the gem > installer. And if they're not, install them :-) What's unclear about it is that it doesn't fucking work.

[Rails] Re: Auto generating forms

2012-03-02 Thread Alpha Blue
That's four tables and they look cumbersome already and I haven't even seen the data yet. Before I give you an answer, drop two example rows from each table and include the fields. I have a feeling that you are not properly normalizing this and over-complicating things for yourself. -- Poste

[Rails] Re: Database design question

2012-03-02 Thread Alpha Blue
I would recommend that when you begin designing your database that you use an ERD (Entity Relationship Diagram) and there are some free software versions out there - RISE has a free software for instance. Use the ERD to setup the relationships visually and it will help you considerably. It als

[Rails] Rails app crashing

2012-03-02 Thread Dave Levi
Hi All, Wondering if anybody has seen this issue. I have a rails 3.2 app I am trying to host on dreamhost. I am using FastCGI. When I attempt to access the site, I get the "Rails application failed to start properly" error. I've determined that the ruby binary is crashing, and it is producing

[Rails] rake shortcut for drop, create, migrate, seed for development and test

2012-03-02 Thread S Ahmed
Is there a rake shortcut to: 1. drop the db (dev and test) 2. create 3. migrate 4. run seed Again for both dev and test environments. I can create an alias, but curious if there is something built-in. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:

Re: [Rails] Re: how to pre-select a collection_select inside a form_for?

2012-03-02 Thread S Ahmed
Ok I added: page.html And my select is actually empty, it has no options! But when running rails server I can see the select and options (and the dropdown list in the browser). Why is it not rendering using capybara? My controller for new is: @account = Account.new My view page has: <% for

Re: [Rails] if current_user.id = game.user_id

2012-03-02 Thread Norm Scherer
On 03/02/2012 04:18 PM, Christopher Jones wrote: Hi all, I have links to the show pages for each game in my project and if the games user_id matches the id of the currently signed in user then I want it to display the edit button if they are not then it shouldn't display. I currently have the f

Re: [Rails] if current_user.id = game.user_id

2012-03-02 Thread Craig White
On Mar 2, 2012, at 4:18 PM, Christopher Jones wrote: > Hi all, > > I have links to the show pages for each game in my project and if the > games user_id matches the id of the currently signed in user then I want > it to display the edit button if they are not then it shouldn't display. > > I cu

Re: [Rails] Generating new application creates a few syntactically bad files in Rails 3.2.1

2012-03-02 Thread nosretep
It appears to be a 1.9.2 addition. On Friday, March 2, 2012 1:32:00 PM UTC-5, Walter Lee Davis wrote: > > > On Mar 2, 2012, at 1:20 PM, nosretep wrote: > > > Running "rails new yourapplicationname" creates all the requisite files, > however two of them have bad syntax. > > > > session_store.rb

[Rails] Weird error in log when using Thin Server with a pretty simple rails application

2012-03-02 Thread Pito Salas
I am pretty new at using the Thin server on my simple rails application. It's working nicely except, that 1 out of 4 times more or less when I go to any page in the app I get this on the browser: Status: 500 Internal Server Error Content-Type: text/html Application error Change this e

[Rails] if current_user.id = game.user_id

2012-03-02 Thread Christopher Jones
Hi all, I have links to the show pages for each game in my project and if the games user_id matches the id of the currently signed in user then I want it to display the edit button if they are not then it shouldn't display. I currently have the following code set but it doesn't work. Every game h

Re: [Rails] Re: Please help. I would like to assign a java variable to a ruby instance variable.

2012-03-02 Thread Abram
Thanks guys On Fri, Mar 2, 2012 at 9:50 AM, Alpha Blue wrote: > You can do that with the Gon gem. > > https://github.com/gazay/gon > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > T

[Rails] Re: Trigger method without changing url

2012-03-02 Thread Robert Walker
Rodrigo Ruiz wrote in post #1049716: > Hi, I'd like to know how can I do a button that on click with call an > action, but wont reload the page. If you're calling back to your same origin (domain) then you can use XHTTPRequest (a.k.a. AJAX). We almost never use that object directly. It's usuall

[Rails] Re: Rails 2.3 not supported?

2012-03-02 Thread Robert Walker
Rob Olson wrote in post #1049878: > I was surprised as well. The previous security issue in August 2011 > that affected 2.3 received a fix and a new release. I also haven't > seen an announcement that that had changed. > > That said, I don't blame the core team for wanting to drop Rails 2.3. > They

[Rails] ConnectionNotEstablished when using connection on AR::Base abstract subclass

2012-03-02 Thread Michael L. Artz
I'm using AR outside of Rails and calling establish_connection on an ActiveRecord::Base abstract_class subclass (to protect my connection in case anyone else is using AR). It was working just fine with AR 3.0.9, but I recently attempted to upgrade to AR 3.2.2. Now, when I hit a "nested" query fro

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread Colin Law
On 2 March 2012 20:18, reynie...@gmail.com wrote: > @Javier: Thanks for your clarifications it's a bit clear to me now > @Colin: I can do that without problem because I'm starting the application > so maybe I could create models from scratch using Rails but what about > fixtures? I've a table coun

Re: [Rails] Generating new application creates a few syntactically bad files in Rails 3.2.1

2012-03-02 Thread Peter Vandenabeele
On Fri, Mar 2, 2012 at 7:32 PM, Walter Lee Davis wrote: > > On Mar 2, 2012, at 1:20 PM, nosretep wrote: > >> Running "rails new yourapplicationname" creates all the requisite files, >> however two of them have bad syntax. >> >> session_store.rb >> >> is: >> YourApplicationName::Application.config

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
@Javier: Thanks for your clarifications it's a bit clear to me now @Colin: I can do that without problem because I'm starting the application so maybe I could create models from scratch using Rails but what about fixtures? I've a table country and will be nice if I can populate the table with 238 r

[Rails] Re: Rails 2.3 not supported?

2012-03-02 Thread Rob Olson
I was surprised as well. The previous security issue in August 2011 that affected 2.3 received a fix and a new release. I also haven't seen an announcement that that had changed. That said, I don't blame the core team for wanting to drop Rails 2.3. They are already supporting 3 branches in the 3.x

[Rails] Re: Bundler could not find compatible versions for gem "railties":

2012-03-02 Thread Bruce A.
Thanks for the recipe. I thought I'd tried that combination before but it had failed. This time it worked. Either something new in 'gems update' changed things or I neglected to do the commit for this particular combination. Either way, thanks for getting me up and running again. -- Posted via

[Rails] JRuby with Ruby on Rails HTTP Streaming outputting odd characters

2012-03-02 Thread nosretep
I'm using Ruby on Rails with JRuby on Tomcat. This is my controller: class ApplicationController < ActionController::Base def index render :stream => true, :text => "Hello World!" end end This is the output: c Hello World! 0 Does anyone have any idea why the "c" or the "0" charac

Re: [Rails] Generating new application creates a few syntactically bad files in Rails 3.2.1

2012-03-02 Thread Walter Lee Davis
On Mar 2, 2012, at 1:20 PM, nosretep wrote: > Running "rails new yourapplicationname" creates all the requisite files, > however two of them have bad syntax. > > session_store.rb > > is: > YourApplicationName::Application.config.session_store :cookie_store, key: > '_yourapplicationname_sessio

[Rails] Generating new application creates a few syntactically bad files in Rails 3.2.1

2012-03-02 Thread nosretep
Running "rails new yourapplicationname" creates all the requisite files, however two of them have bad syntax. session_store.rb is: YourApplicationName::Application.config.session_store :cookie_store, key: '_yourapplicationname_session' should be: YourApplicationName::Application.config.session

Re: [Rails] Re: Database design question

2012-03-02 Thread Walter Lee Davis
On Mar 2, 2012, at 11:53 AM, edap e. wrote: > Hey Walter, thanks for your reply. Yes I've read this part, but i've > thought that it was not the best solution, probably i was worng. > Today I've saw also this solution, that maybe fit my problem > http://www.unixgods.org/~tilo/Rails/Rails_polympr

Re: [Rails] Re: rails and javascript

2012-03-02 Thread Dev Guy
On Wed, Feb 29, 2012 at 11:21 PM, Alpha Blue wrote: > There are a few ways to do this.  If you are looking for an ajax > response you can do the following: > > (this is an example with a new action) > > <%= form_for Model.new, :remote => true do |f| %> > > Your Label > >  <%= f.collection_select(

[Rails] Re: Database design question

2012-03-02 Thread edap e.
Hey Walter, thanks for your reply. Yes I've read this part, but i've thought that it was not the best solution, probably i was worng. Today I've saw also this solution, that maybe fit my problem http://www.unixgods.org/~tilo/Rails/Rails_polymprphic_has_many_through_relationships.html Please corre

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread Walter Lee Davis
On Mar 2, 2012, at 10:41 AM, reynie...@gmail.com wrote: > Also can my tables be named in singular or all needs to be plural? I'm > reading conventions right now but have this doubt. For example if I have a > table called record the correct name for the model could be Record << > ActiveRecord::

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread Walter Lee Davis
On Mar 2, 2012, at 10:39 AM, reynie...@gmail.com wrote: > Thanks Javier and what about ID (PK) fields? Need to be specified too or > Rails is smart enough to get them from tables? To be clear, the instructions that Javier gave you are to create a new table and model to match, not to introspect

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread Colin Law
On 2 March 2012 15:41, reynie...@gmail.com wrote: > Also can my tables be named in singular or all needs to be plural? I'm > reading conventions right now but have this doubt. For example if I have a > table called record the correct name for the model could be Record << > ActiveRecord::Base? You

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread Javier Quarite
When you generate for example rails generate model Projects name:string it will generate a table id name created_at updated_at and as you see I named it PROJECTS but rails is smart enough to change it into PROJECT =) You should give this tutorial a try http://ruby.railstutorial.org/ and also

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
Also can my tables be named in singular or all needs to be plural? I'm reading conventions right now but have this doubt. For example if I have a table called record the correct name for the model could be Record << ActiveRecord::Base? Ing. Reynier Perez Mira eMail: reynie...@gmail.com, reynie...@h

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
Thanks Javier and what about ID (PK) fields? Need to be specified too or Rails is smart enough to get them from tables? Ing. Reynier Perez Mira eMail: reynie...@gmail.com, reynie...@hotmail.com Skype: reynierpm Mobile: +58 424.180.5609 Site: http://reynierpm.site90.com On Fri, Mar 2, 2012 at 11:

Re: [Rails] Starting my first application with Rails

2012-03-02 Thread Javier Quarite
On Fri, Mar 2, 2012 at 10:33 AM, reynie...@gmail.com wrote: > Hi: > I'm starting a simple application to learn Rails and Ruby of course. I > come from PHP and frameworks like Symfony, CakePHP and CodeIgniter and some > of them have a task to create DB models from existent database which is my > ca

[Rails] Starting my first application with Rails

2012-03-02 Thread reynie...@gmail.com
Hi: I'm starting a simple application to learn Rails and Ruby of course. I come from PHP and frameworks like Symfony, CakePHP and CodeIgniter and some of them have a task to create DB models from existent database which is my case. I have a PostgreSQL database which want to use in my app. My questi

Re: [Rails] Can't start server, why?

2012-03-02 Thread reynie...@gmail.com
Ok and thanks now it works fine :) Ing. Reynier Perez Mira eMail: reynie...@gmail.com, reynie...@hotmail.com Skype: reynierpm Mobile: +58 424.180.5609 Site: http://reynierpm.site90.com On Fri, Mar 2, 2012 at 9:04 AM, Colin Law wrote: > On 2 March 2012 11:46, ReynierPM wrote: > >> $ rake enviro

Re: [Rails] Database design question

2012-03-02 Thread Walter Lee Davis
On Mar 2, 2012, at 5:29 AM, edap e. wrote: > Hello, i'm developing a Rails3 application mixing together Gmap4rails > and Devise to build a CMS that allows web developers to make maps > application quickly. The CMS now is based on 2 models. > Location, stores latitude, longitude and name of the ma

Re: [Rails] Can't start server, why?

2012-03-02 Thread Colin Law
On 2 March 2012 11:46, ReynierPM wrote: >> $ rake environment > > (in /var/www/html/jobapp) > rake aborted! > > Could not find a JavaScript runtime. See > https://github.com/sstephenson/execjs for a list of available runtimes. > > (See full trace by running task with --trace) > > >> 2) Add the lin

Re: [Rails] OT: Why I can't see my email

2012-03-02 Thread reynie...@gmail.com
Yes you're right Google has the result and is the problem itself because for prevent something it send my messages directly to "All mail" :-( and there is not way to change it, anyway thanks Ing. Reynier Pérez Mira http://reynierpm.site90.com/ On Fri, Mar 2, 2012 at 7:29 AM, Michael Pavling wro

Re: [Rails] OT: Why I can't see my email

2012-03-02 Thread Michael Pavling
On 2 March 2012 11:52, ReynierPM wrote: > Hi: > I'm having a problem with this list and it's that I can't see my own emails > and don't know the cause. I check my configuration in Google Groups and it > says that "Email: send each message to me as it arrives" so any help or tip? > I just only see

[Rails] Resourceful routing and admin namespace question

2012-03-02 Thread Agis A.
Hi all. I have a route file like this: Deals::Application.routes.draw do root to: "Main#home" resources :vendors do resources :offers end match '/admin' => 'Admin::Pages#index' namespace :admin do match '/login', to: 'Sessions#new' resources :offers, :vendors resources

[Rails] OT: Why I can't see my email

2012-03-02 Thread ReynierPM
Hi: I'm having a problem with this list and it's that I can't see my own emails and don't know the cause. I check my configuration in Google Groups and it says that "Email: send each message to me as it arrives" so any help or tip? I just only see the reply from members lists but not my email

Re: [Rails] Can't start server, why?

2012-03-02 Thread ReynierPM
> $ rake environment (in /var/www/html/jobapp) rake aborted! Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (See full trace by running task with --trace) > 2) Add the line > >gem 'therubyracer' > > to your Gemfile I've sto

Re: [Rails] Re: JIRA anyone?

2012-03-02 Thread Tom Allison
Thanks all for the feedback. Good information! Now a few comments on where I am today: Jira 5.0 does have some nice REST API features that I'm working with. Not sure it has everything I need but it seems that previous versions are a little light on REST support. Currently stuck in the cloud an

[Rails] Re: rails3 data inserting issues

2012-03-02 Thread Juan Pablo Avello
El viernes 2 de marzo de 2012 10:35:20 UTC+1, amvis escribió: > > I am using rails3. when i am trying to insert data into postgrsql got the > error like this > > > *PGError: ERROR: value too long for type character varying(15)* > > In the migration file have * t.string > :contact_number,:limit=

[Rails] Database design question

2012-03-02 Thread edap e.
Hello, i'm developing a Rails3 application mixing together Gmap4rails and Devise to build a CMS that allows web developers to make maps application quickly. The CMS now is based on 2 models. Location, stores latitude, longitude and name of the marker Categories, stores the name of the category and

[Rails] Re: rails console is not working

2012-03-02 Thread Michal Papis
I see you use linux, most distributions provide a valid build and headers for readline, please use quick fix instruction from top of this page: https://rvm.beginrescueend.com/packages/readline/ On Mar 2, 10:51 am, Anurag Sachan wrote: > I also use  rvm pkg install readline but it did not help me

[Rails] Re: rails console is not working

2012-03-02 Thread Anurag Sachan
I also use rvm pkg install readline but it did not help me On Friday, 2 March 2012 15:20:01 UTC+5:30, Anurag Sachan wrote: > > I got this error in my terminal when i type rails c: > > -

[Rails] rails console is not working

2012-03-02 Thread Anurag Sachan
I got this error in my terminal when i type rails c: -- anurag@anurag-Compaq-Presar

[Rails] [RESOLVED] Re: strange output of url_for always returns assets?*

2012-03-02 Thread luiz aoki
After numerous changes I found the solution. If you have config.assets.enabled = true in your configuration you need use brackets url_for {:action => 'foo', :controller => 'blah'} or puts the :controller in the first place url_for :controller => 'blah', :action => 'foo' Regards, Luiz --

[Rails] rails3 data inserting issues

2012-03-02 Thread amvis
I am using rails3. when i am trying to insert data into postgrsql got the error like this *PGError: ERROR: value too long for type character varying(15)* In the migration file have * t.string :contact_number,:limit=>15,:null=>false*. this string because the contact_number will be +91 9387292

Re: [Rails] Has Many Through Controller

2012-03-02 Thread Colin Law
On 1 March 2012 23:03, Brandon Might wrote: > My models: > > class Product < ActiveRecord::Base > > >     has_many :Orders_Products That should be :orders_products all lower case, so matching the table name. The same applies to all later relationships. Colin >     has_many :Orders, through: :O

[Rails] Re: HTTP Streaming with Ruby on Rails running with JRuby (on Tomcat)

2012-03-02 Thread nosretep
On Friday, March 2, 2012 3:33:40 AM UTC-5, mkristian wrote: > > this feature needs Fiber and that you have only with ruby 1.9.x, i.e. > you need to use jruby in 1.9 mode. there is options setting in jruby- > rack (or in warbler). > Yes, just found that. This now works. warble.rb: Warbler::Conf

[Rails] strange output of url_for always returns assets?*

2012-03-02 Thread luiz aoki
Hello All, I have a problem using url_for() or redirect_to(), etc. For example if I put url_for :action => 'foo', :controller => 'blah' I expect to get "/blah/foo" but always get "/assets?action=foo?controller=blah". Have I some miss on my configurations or some think like? Thank you, Luiz -

[Rails] Re: HTTP Streaming with Ruby on Rails running with JRuby (on Tomcat)

2012-03-02 Thread mkristian
this feature needs Fiber and that you have only with ruby 1.9.x, i.e. you need to use jruby in 1.9 mode. there is options setting in jruby- rack (or in warbler). -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send