Re: [Rails] Re: how to get effects from test database to development database

2012-09-22 Thread Peter Hickman
To be honest you should fix your development database to be how it should be. If it is correct and the test database does not match then the test database is in error. You are getting no response to your query because no one in their right mind would do what you want to do and so there is no

[Rails] Re: Rails on windows

2012-09-22 Thread Frederick Cheung
On Friday, September 21, 2012 8:25:39 PM UTC+1, Ruby-Forum.com User wrote: lyosha wrote in post #1076588: man.. why does everything is so slow on developing on windows? It's not. Check your machine and rails configuration. Development environment will always be slower than production

[Rails] Re: Translate rails guides to portuguese

2012-09-22 Thread Frederick Cheung
On Thursday, September 20, 2012 5:30:29 PM UTC+1, Rafael Macedo wrote: hi folks, i wish to know if there's a way to translate the rails guides to portuguese or others languages. I believe this way we can help community growing more each day. i`m really interested to help translate to

[Rails] Re: Intro and some Architectual Questions

2012-09-22 Thread Jammer Jamski
Dheeraj Kumar wrote in post #1077054: Explore https://www.ruby-toolbox.com/ Dheeraj Kumar Hi Dheeraj, Many thanks for the link, this resource looks amazing. Thank you! Jam -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: how to get effects from test database to development database

2012-09-22 Thread Fahim Patel
I just want to make my development database same as test database . Is there any command to make this possible? As i know rake db:test:prepare command update test database as development database. But i wish to do opposite ? Hope u understand the question On Friday, September 21, 2012 4:49:58

Re: [Rails] Re: how to get effects from test database to development database

2012-09-22 Thread Peter Hickman
There is no command to migrate the structure of the test database to the development database. There is no need for such a command. Just create migrations for the development database that set it up correctly in the first place. -- You received this message because you are subscribed to the

Re: [Rails] Re: has_and_belongs_to_many migration problem i am facing

2012-09-22 Thread Jim Ruther Nill
On Fri, Sep 21, 2012 at 9:07 PM, Fahim Patel pafa...@gmail.com wrote: No man ... i just use HABM in models and when i fire command in console at that point third table is created. And i do nothing manually.. Hi! I don't use habtm so I'm not familiar with how it work in core. But

[Rails] Re: how to get effects from test database to development database

2012-09-22 Thread Fahim Patel
Actually i have raise same question yesterday, but no buddy response . Today i raise new topic and u response.. I will explain now I am using has_and_belong_to_many association . This association will create third table automatically as per my knowledge, and by chance i have deleted that

Re: [Rails] Re: how to get effects from test database to development database

2012-09-22 Thread Fabian Becker
For a has_and_belongs_to_many association there has to be a migration (but there is no model!). Rails does not automatically create tables for you. If you are still in development, just drop your database and migrate again: rake db:migrate:reset On Sat, Sep 22, 2012 at 12:06 PM, Fahim Patel

[Rails] Re: how to get effects from test database to development database

2012-09-22 Thread Fahim Patel
Now i am surprise, because i just write has_and_belongs_to_many in my models. And i go to console and i fire the command and i get nil. At this moment my third table created automaticlly, no migration file is present is there. rake db:migrate:reset # what this command will do ? On Friday,

[Rails] Getting Started

2012-09-22 Thread rabinprithvi
I am new to rails. When I generate scaffold for products , in products/index.html i have this code h1Listing users/h1 table tr thName/th /tr % @users.each do |user| % tr td%=h user.name %/td td%= link_to 'Show', user %/td td%= link_to 'Edit', edit_user_path(user) %/td

Re: [Rails] Getting Started

2012-09-22 Thread Fabian Becker
Because by default the show_path is used for a model if you hand it to the link_to helper. On Sat, Sep 22, 2012 at 1:19 PM, rabinprithvi rabindranath.prit...@gmail.com wrote: I am new to rails. When I generate scaffold for products , in products/index.html i have this code h1Listing

[Rails] Error from New Site

2012-09-22 Thread Jammer Jamski
Hi, I'm using RubyMine to work through some tutorials and I've encountered an error. The install of Ruby, RoR and RubyMine are all the latest versions. I'm working on a tutorial that uses restful_authentication. When I run: rails plugin install http://github.com/technoweenie/restful-authenti

[Rails] Help going from Rails 3.2.8 to 3.2.1

2012-09-22 Thread Michael John
Hey everyone. I have rails 3.2.8 installed but I need 3.2.1 installed either paralell with 3.2.8 or permently replacing it. I received work with an existing 3.2.1 site, and the owner does not want to upgrade to 3.2.8. I downloaded release 3.2.1 from GitHub however I can not figure out how to

[Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Mauro
On 21 September 2012 12:50, Mauro mrsan...@gmail.com wrote: I'm using devise for authentication: In my user model I've do: def name #{first_name} #{last_name} end to have a name method. After signed in successfully I can use current_user.name. I want to overwrite name method if the

[Rails] Re: Help going from Rails 3.2.8 to 3.2.1

2012-09-22 Thread Frederick Cheung
On Saturday, September 22, 2012 2:05:03 PM UTC+1, Michael John wrote: Hey everyone. I have rails 3.2.8 installed but I need 3.2.1 installed either paralell with 3.2.8 or permently replacing it. I received work with an existing 3.2.1 site, and the owner does not want to upgrade to 3.2.8.

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 7:05 AM, Mauro mrsan...@gmail.com wrote: The guest user signed in successfully, now its name is, for example, guest guest. current_user.name is guest guest. After signed in I present a form with a name input field and a surname input field. Submitting the form I

[Rails] (koans) uninitialized constant TriangleError

2012-09-22 Thread roelof
Hello, I have to make a exception part on triangles now. The exercise looks like this : [/code] **# You need to write the triangle method in the file 'triangle.rb' require 'triangle.rb' class AboutTriangleProject2 EdgeCase::Koan # The first assignment did not talk about how to handle

Re: [Rails] Error from New Site

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 6:44 AM, Jammer Jamski li...@ruby-forum.com wrote: I'm using RubyMine to work through some tutorials and I've encountered an error. The install of Ruby, RoR and RubyMine are all the latest versions. Please be precise: that means nothing to me now, and will mean even

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Mauro
On 22 September 2012 16:33, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sat, Sep 22, 2012 at 7:05 AM, Mauro mrsan...@gmail.com wrote: The guest user signed in successfully, now its name is, for example, guest guest. current_user.name is guest guest. After signed in I present a

[Rails] Record count from different table

2012-09-22 Thread Dave Castellano
I am trying to count the number of questions in each subject and then display the question count for each subject next to the subject name: Model has_many :questions Controller def index @subjects = Subject.order(:title) @question_number = Question.find(???).count end end View a

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 8:03 AM, Mauro mrsan...@gmail.com wrote: Yes I want to save in session but how can access the session? user_session hash is empty. session[foo] = bar Of course it's empty until you put something there :-) -- Hassan Schroeder

[Rails] A super-easy and great way to implement Gem configuration

2012-09-22 Thread gsw
Just did this in my constance gem, and totally love it as a way to add configuration or options configurability to your gem: http://stufftohelpyouout.blogspot.com/2012/09/forget-struct-and-openstruct-flexible.html like: module MyModule class self attr_accessor :debug, :proc,

[Rails] Re: Error from New Site

2012-09-22 Thread Jammer Jamski
Please be precise: that means nothing to me now, and will mean even less when someone reads this post in an archive a year from now. point taken. Which, if you look at the repo, hasn't been updated in a *long* time and probably doesn't work under Rails 3. Look closely at your tutorials and

[Rails] Version Confusion

2012-09-22 Thread Jammer Jamski
Hi All, I've taken a step back after my last post and I'm reviewing what I have installed before looking for newer correct tutorials. I installed everything initially last weekend (15/09/2012) including Ruby, RoR and RubyMine. I've just opened a Command Prompt on my win 7 64bit box and ran:

Re: [Rails] Record count from different table

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 8:04 AM, Dave Castellano li...@ruby-forum.com wrote: I am trying to count the number of questions in each subject and then display the question count for each subject next to the subject name: a href=/.../%= subject.id %%= subject.title % (%= @question_number %)/a

[Rails] Re: Record count from different table

2012-09-22 Thread Dave Castellano
Thanks, was overthinking it! Dave -- 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

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Mauro
On 22 September 2012 17:32, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sat, Sep 22, 2012 at 8:03 AM, Mauro mrsan...@gmail.com wrote: Yes I want to save in session but how can access the session? user_session hash is empty. session[foo] = bar Of course it's empty until you put

Re: [Rails] Re: has_and_belongs_to_many migration problem i am facing

2012-09-22 Thread Dave Aronson
On Sat, Sep 22, 2012 at 6:00 AM, Jim Ruther Nill jvn...@gmail.com wrote: reading from http://guides.rubyonrails.org/association_basics.html#the-has_and_belongs_to_many-association The simplest rule of thumb is that you should set up a has_many :through relationship if you need to work with

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 9:26 AM, Mauro mrsan...@gmail.com wrote: Sorry but I don't undestand very well. In https://github.com/plataformatec/devise is said that user_session is an helper to access the session of the successfully signed in user. So after signed in I expect to find something in

[Rails] Re: (koans) uninitialized constant TriangleError

2012-09-22 Thread roelof
Hello, I found this solution : # about_triangle_project.rb # and # about_triangle_project_2.rb # def triangle(a, b, c) raise (TriangleError), length cannnot be 0 or lesser if (a = 0) or (b = 0) or (c = 0); raise (TriangleError), length does not match Pyschotorogas if (a * a + b * b

[Rails] Re: Help going from Rails 3.2.8 to 3.2.1

2012-09-22 Thread Michael John
Hey Fred, I've ran bundle install, but when I want to start the server I get the following error: Error is the same for both 'rails server' and 'bundle exec rails server' - $ bundle exec rails server

Re: [Rails] Re: Help going from Rails 3.2.8 to 3.2.1

2012-09-22 Thread Benjamin Iandavid Rodriguez
Add the ruby racer gem to your gem file otherwise install node js Regards 2012/9/22 Michael John gosh.m...@gmail.com Hey Fred, I've ran bundle install, but when I want to start the server I get the following error: Error is the same for both 'rails server' and 'bundle exec rails server'

[Rails] Class, Module, Object

2012-09-22 Thread John Merlino
reload! Reloading... = true puts Class Module true = nil puts Module Class false = nil puts Module Object true = nil puts Object Module false = nil Object.parent = Object The above indicates that the Class object instance inherits from the Module object instance and the Module object

Re: [Rails] Re: Help going from Rails 3.2.8 to 3.2.1

2012-09-22 Thread Michael John
Ian, adding the ruby racer gem to the gem file worked. Thank you both for your help, I appreciate it. -Michael On Saturday, September 22, 2012 3:58:07 PM UTC-4, Ian_Rgz wrote: Add the ruby racer gem to your gem file otherwise install node js Regards -- You received this message

[Rails] Missing template projects/index, application/index ?

2012-09-22 Thread wragen22
Getting this issue...even though I have my views there in both the projects and application. Also getting a routes issue No route matches [GET] /projects when going to projects when I have root :to = projects#index defined in my routes file. Any idea? 1) Creating Projects can create a

[Rails] Re: Class, Module, Object

2012-09-22 Thread 7stud --
Module.is_a?(Class) Module inherits from Object, Object is an instance of Class. Object.is_a?(Module) Object is an instance of Class, Class inherits from Module. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Version Confusion

2012-09-22 Thread 7stud --
1) Did you try shutting your command window and opening a new one and then typing rails --verson? 2) Post the value of your PATH environment variable. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk