[Rails] Re: Play! 2.0 (Scala) or RubyOnRail (Ruby)?

2012-06-09 Thread johnCode
I'm surprise Ruby community look so quiet that most have left? On Jun 8, 11:01 pm, johnCode wrote: > Hi ruby community, > > It has been months after much experimenting RubyOnRail but it wasn't > chosen for my Enterprise > project. Recently, I heard some of my friends argue that RubyOnRail is > E

[Rails] Re: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' i

2012-06-09 Thread Matt Jones
On Friday, 8 June 2012 21:08:18 UTC-4, Commander Johnson wrote: > > Hello, > > I stumble upon this error when loading a subclass of the Transaction > class. For full details, see the pastie: > > http://pastie.org/4053678 > > Error message: ActiveRecord::SubclassNotFound: The single-table > i

[Rails] Re: Expected … to define Base

2012-06-09 Thread Matt Jones
On Friday, 8 June 2012 08:54:19 UTC-4, Zeck wrote: > > I new to rails. I have a setup in the lib directory like so: > > lib/ >blog/ > core/ > search/ > base.rb > > The base.rb defines the Base class as well: > > module Blog > module Core > module Search >

[Rails] Re: if else statement

2012-06-09 Thread Paul McGuane
Hi Michael, I have tried the code you suggested, though all i seem to get is every result as a tie. this is what I have in my #model def win_lose_tie return :tie if if schedule.for.to_i == schedule.against.to_i schedule.for.to_i > schedule.against.to_i ? :win : :lose end

[Rails] Re: if else statement

2012-06-09 Thread Paul McGuane
Thanks Michael, though i would have thought if its greater than nil it would still output my response -- 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 rubyon

Re: [Rails] Re: How to install gem on hosting site without installing?

2012-06-09 Thread Hassan Schroeder
On Sat, Jun 9, 2012 at 8:20 AM, renu mehta wrote: > offer the following setup : > > Ruby 1.8.7, Rails 3.0.3 and Mysql 5.1 So you're getting a version of Ruby that's no longer getting bug fixes and will be fully EOL'd in a year, and a very old version of Rails lacking current security fixes (the

[Rails] Re: filter children with acts_as_tree

2012-06-09 Thread ibrahim hassan
Thanks for all your answers i will test this and give you a feedback can i use a scope for this also? -- 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 rubyon

Re: [Rails] How to install gem on hosting site without installing?

2012-06-09 Thread Walter Lee Davis
Heroku is Free for small projects. Walter On Jun 9, 2012, at 11:20 AM, renu mehta wrote: > As I am working for a small non-profit charity organization hence cost > of hosting is a issue. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.

Re: [Rails] rake about > Environment staging

2012-06-09 Thread tom
no, it executes eg the migrations on the staging-db, but if i start up webrick via "rails s" it comes up the standard development environment where does rake get the environment info if i ommit 'RAILS_ENV' when executing a rake command? thx On Sat, Jun 9, 2012 at 10:21 PM, Colin Law wrote: >

Re: [Rails] rake about > Environment staging

2012-06-09 Thread Colin Law
On 9 June 2012 20:11, tom wrote: > hi, > its just a simple rake import tasks (using :environment, but all my rake > commands are affected, even a migration goes straight to staging... > > namespace :import do >   desc "import automobiles step1" >   task :automobiles => :environment do >     .

Re: [Rails] rake about > Environment staging

2012-06-09 Thread tom
hi, its just a simple rake import tasks (using :environment, but all my rake commands are affected, even a migration goes straight to staging... namespace :import do desc "import automobiles step1" task :automobiles => :environment do . > i've checked everything for stagi

Re: [Rails] rake about > Environment staging

2012-06-09 Thread Oscar Del Ben
what's the content of Rakefile? -- Oscar Del Ben Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Friday, June 8, 2012 at 12:14 PM, tom wrote: > its empty > > here are some values from 'env' > > MY_RUBY_HOME=/home/tom/.rvm/rubies/ruby-1.9.3-p194 > rvm_bin_path=/home/tom/.rvm/bin > G

Re: [Rails] Re: Can't mass-assign protected attributes:

2012-06-09 Thread Grégory Bataille
hum, you're right, I mixed things up in my head. I indeed don't know of any :( On Sat, Jun 9, 2012 at 1:54 PM, Colin Law wrote: > On 8 June 2012 07:57, Bataille Gregory wrote: > > Indeed, the right way would have been to use the generator to add a > field to > > your model. This would have upd

[Rails] Re: A simple csv import function to my Rails application

2012-06-09 Thread Anders Andrew
Colin Law wrote in post #1063851: > On 9 June 2012 16:42, Anders Andrew wrote: >> I am quite new to Rails, so nothing fancy. Preferably some basic code in >> View, Controller and Model. >> >> My sqlite3 database has a table that contains the corresponding columns. > > Which bit do you need help wi

Re: [Rails] Modeling one way associations

2012-06-09 Thread Michael Pavling
On 9 June 2012 17:51, Colin Law wrote: > @Michael, perhaps we should work in shifts. > > Colin :-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 fr

Re: [Rails] Modeling one way associations

2012-06-09 Thread Colin Law
On 9 June 2012 17:35, Michael Pavling wrote: > On 9 June 2012 16:45, Jason Walsh wrote: >> I am working on a project where I have a Process object that references >> a Node object.  I have tried adding a node_id column in the Process >> table and created an has_one relationship in the Process mod

Re: [Rails] if else statement

2012-06-09 Thread Michael Pavling
On 9 June 2012 17:26, Paul McGuane wrote: > undefined method `>' for nil:NilClass > Extracted source (around line #47): The error is telling you that the thing you are calling "greater than" on is nil. Looking at line 47, that thing is "schedule.for" - this value, although you *think* it may be a

Re: [Rails] if else statement

2012-06-09 Thread Colin Law
On 9 June 2012 17:26, Paul McGuane wrote: > Hi > I am doing a basic if..else statement and keep getting exceptions > both of these are stored as int's > > <% if schedule.for>schedule.against %> >                      W >                  <% elsif schedule.for >                      L >            

Re: [Rails] Modeling one way associations

2012-06-09 Thread Michael Pavling
On 9 June 2012 16:45, Jason Walsh wrote: > I am working on a project where I have a Process object that references > a Node object.  I have tried adding a node_id column in the Process > table and created an has_one relationship in the Process model. Change that relationship definition to a belon

Re: [Rails] Modeling one way associations

2012-06-09 Thread Colin Law
On 9 June 2012 16:45, Jason Walsh wrote: > Hi > > I am working on a project where I have a Process object that references > a Node object.  I have tried adding a node_id column in the Process > table and created an has_one relationship in the Process model. If you have node_id in Process then you

Re: [Rails] A simple csv import function to my Rails application

2012-06-09 Thread Colin Law
On 9 June 2012 16:42, Anders Andrew wrote: > Hi. > > I am in the process of making an application that should handle imports > of the content csv. I plan on incorporating AJAX when I get more routine > (so the page don't have to redirect back after the upload), but for now > I am looking for the s

[Rails] if else statement

2012-06-09 Thread Paul McGuane
Hi I am doing a basic if..else statement and keep getting exceptions both of these are stored as int's <% if schedule.for>schedule.against %> W <% elsif schedule.for L <% else %> T

[Rails] Modeling one way associations

2012-06-09 Thread Jason Walsh
Hi I am working on a project where I have a Process object that references a Node object. I have tried adding a node_id column in the Process table and created an has_one relationship in the Process model. When trying Process.node.create(@attr) am getting an error as the sql is trying to update

[Rails] A simple csv import function to my Rails application

2012-06-09 Thread Anders Andrew
Hi. I am in the process of making an application that should handle imports of the content csv. I plan on incorporating AJAX when I get more routine (so the page don't have to redirect back after the upload), but for now I am looking for the simplest upload function. A file could for example be (F

[Rails] Re: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' i

2012-06-09 Thread Андрей Большов
Sorry, in real it's about requiring class, try check if your subclasses class is loaded properly. суббота, 9 июня 2012 г., 5:08:18 UTC+4 пользователь Commander Johnson написал: > > Hello, > > I stumble upon this error when loading a subclass of the Transaction > class. For full details, see th

[Rails] Re: How to install gem on hosting site without installing?

2012-06-09 Thread renu mehta
Frederick Cheung wrote in post #1063813: > On Jun 7, 10:24pm, renu mehta wrote: >> I haven't worked much with heroku before- basically learning. Do they >> support mysql? Their logging was not good before as it allowed only last >> 100 lines. Has it changed recently? What other limitations does it

[Rails] Re: ActiveRecord::AssociationTypeMismatch in UsersController#update

2012-06-09 Thread Paul McGuane
Thanks Hassan, I now have a better understanding of what you mean -- 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 unsub

Re: [Rails] Re: ActiveRecord::AssociationTypeMismatch in UsersController#update

2012-06-09 Thread Hassan Schroeder
On Sat, Jun 9, 2012 at 8:05 AM, Paul McGuane wrote: > i have tried something similar and got this ? That's not remotely similar to your original example: > when i call the following <%= user.team %> i am getting this displayed Doesn't it seem apparent that if this <%= user.team %> shows you th

[Rails] Re: ActiveRecord::AssociationTypeMismatch in UsersController#update

2012-06-09 Thread Paul McGuane
hi hassan i have tried something similar and got this NoMethodError in Users#index Showing /Users/*/Sites/rails_projects/*/app/views/users/index.html.erb where line #67 raised: undefined method `teams' for nil:NilClass Extracted source (around line #67): 64: class="a

Re: [Rails] Re: ActiveRecord::AssociationTypeMismatch in UsersController#update

2012-06-09 Thread Hassan Schroeder
On Sat, Jun 9, 2012 at 7:47 AM, Paul McGuane wrote: > though in my view/users/index > when i call the following <%= user.team %> i am getting this displayed > #, i want it to display what team the player has been > allocated to That (#) *is* the team - a Team *object*. Maybe you actually want t

[Rails] Re: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' i

2012-06-09 Thread Андрей Большов
Answer in your error message rename column " type", or Transactions::DummyDdnlTransaction.inheritance_column="not_type_column" суббота, 9 июня 2012 г., 5:08:18 UTC+4 пользователь Commander Johnson написал: > > Hello, > > I stumble upon this error when loading a subclass of the Transaction >

[Rails] Re: ActiveRecord::AssociationTypeMismatch in UsersController#update

2012-06-09 Thread Paul McGuane
Hi Thanks for the help, i managed to get this to work with the following line <%= f.select("team_id", Team.all.collect { |p| [p.name, p.id] }, { :include_blank => 'None' }) %> though in my view/users/index when i call the following <%= user.team %> i am getting this displayed #, i want it to d

[Rails] Re: ActiveRecord::AssociationTypeMismatch in UsersController#update

2012-06-09 Thread Андрей Большов
http://api.rubyonrails.org/classes/ActiveRecord/AssociationTypeMismatch.html I gues it's raise because you don't assign object. You should change it this way: <%= select("user", "*team_id*", Team.all.collect { |p| [p.name, p.id] }, {:include_blank => 'None'}) %> суббота, 9 июня 2012 г., 6

Re: [Rails] Re: Can't mass-assign protected attributes:

2012-06-09 Thread Colin Law
On 8 June 2012 07:57, Bataille Gregory wrote: > Indeed, the right way would have been to use the generator to add a field to > your model. This would have update your model AND created a DB migration. > In your case, you changed the DB, but not the Ruby object that corresponds > to it. So indeed t

[Rails] Re: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' i

2012-06-09 Thread Commander Johnson
FIXED: Transaction is a reserved word, and it cannot be used even though I put it into its own module. So my guess is Transactions::Transaction still somehow got resolved to the Rails internal Transaction class. Renamed the Transaction (and its subclasses) to Transact and it works fine now. Thank

[Rails] Re: How to install gem on hosting site without installing?

2012-06-09 Thread Frederick Cheung
On Jun 7, 10:24 pm, renu mehta wrote: > I haven't worked much with heroku before- basically learning. Do they > support mysql? Their logging was not good before as it allowed only last > 100 lines. Has it changed recently? What other limitations does it have > in the production enviornment? > H

[Rails] Ruby on Rails Developer in Seattle

2012-06-09 Thread rdolorin
Looking for Rails specialist that can creat quick and clean code. -- 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 rubyo

[Rails] Re: Paginating with couchrest_model

2012-06-09 Thread Sam Lown
Hi, You might might be better posting this couchrest messages to the couchrest google group, I only found this message by chance. Firstly, your map function is not very good; sticking a doc into a the value field of the index is a really bad idea. Secondly, you should be using the new design b

[Rails] Play! 2.0 (Scala) or RubyOnRail (Ruby)?

2012-06-09 Thread johnCode
Hi ruby community, It has been months after much experimenting RubyOnRail but it wasn't chosen for my Enterprise project. Recently, I heard some of my friends argue that RubyOnRail is Enterprise-class framework which perform much better than PHP. IMHO, I think Play! 2.0 (Scala) can offer more than

[Rails] Ruby India group launch

2012-06-09 Thread cmittal
Hey Rubyonrails fellows, I have started a new group called 'Ruby India' whose founding purpose is to build a strong, organized and open community around Ruby programming language and its related technologies, and to further its use and adoption in India. My attempt is to make this group as parent

[Rails] Re: route is not loading correct action

2012-06-09 Thread Андрей Большов
Maybe you have some route that overwrite this route, look at your route file lines before you write. пятница, 8 июня 2012 г., 7:49:17 UTC+4 пользователь John Merlino написал: > > Hey all, > > > When I run rake routes, I see this: > > > inventory_dashboard /i

[Rails] Re: Can't mass-assign protected attributes:

2012-06-09 Thread Bataille Gregory
Indeed, the right way would have been to use the generator to add a field to your model. This would have update your model AND created a DB migration. In your case, you changed the DB, but not the Ruby object that corresponds to it. So indeed the new field does not exist in your object, thus the

[Rails] App as Collection of Engines

2012-06-09 Thread Jason Waldrip
I have an interesting idea for segmenting an app into various rails engines for easier development from a massive dev team and to allow each engine to connect to its own database instance. With that concept in mind I have run into a few complications that I was hoping for some guidance on.

[Rails] Error in creation of new Rails Project

2012-06-09 Thread ane...@gmail.com
Hi, I have followed all the instructions to install the ruby on rails as said in the home page ( I think I have done ). But when I run the > rails new tickets after creating new files and sub-directories the following message appears Using rack-ssl (1.3.2) Installing json (1.7.3) Gem::Install

Re: [Rails] Re: How to install gem on hosting site without installing?

2012-06-09 Thread Pandya, Amit
read this book, it will say How to deploy yr site on Heroku http://ruby.railstutorial.org/ruby-on-rails-tutorial-book Thanks -- Warm Regards, Amit Pandya End is not end, In-fact E.N.D is "EFFORT NEVER DIES" If you get NO in answer, remember N.O. is "NEXT OPPORTUNITY" Impossible just separate

Re: [Rails] How to install gem on hosting site without installing?

2012-06-09 Thread Pandya, Amit
yes, you can do copy paste but not reliable solution. What OS are you using? let me know I will give you few steps for copy and paste Thanks -- Warm Regards, Amit Pandya End is not end, In-fact E.N.D is "EFFORT NEVER DIES" If you get NO in answer, remember N.O. is "NEXT OPPORTUNITY" Impossible

Re: [Rails] ActiveRecord::AssociationTypeMismatch in UsersController#update

2012-06-09 Thread Colin Law
On 9 June 2012 03:36, Paul McGuane wrote: > Hi > Im trying to link my User model to a Teams model. I seem to be getting > the following errors. Any help would be great as Im just new to RoR > Thanks > > error > ActiveRecord::AssociationTypeMismatch in UsersController#update > > Team(#2183395560) e