Re: [Rails] migration problems

2017-04-28 Thread Colin Law
On 29 Apr 2017 3:05 a.m., "Joe Guerra" wrote: oh, right. Just to do some minor things, but with pgadmin you have to write a bunch of sql. What sort of minor things? Often you can do things from the rails console. On Friday, April 28, 2017 at 9:18:54 AM UTC-4, Colin Law wrote: > > On 28 April

Re: [Rails] migration problems

2017-04-28 Thread Joe Guerra
oh, right. Just to do some minor things, but with pgadmin you have to write a bunch of sql. On Friday, April 28, 2017 at 9:18:54 AM UTC-4, Colin Law wrote: > > On 28 April 2017 at 14:15, Joe Guerra > > wrote: > > Got it working. I was just using the default settings that ror. It's > much >

Re: [Rails] migration problems

2017-04-28 Thread Colin Law
On 28 April 2017 at 14:15, Joe Guerra wrote: > Got it working. I was just using the default settings that ror. It's much > easier to deal with sqlite in development. I hate using PGAdmin for > postgres. Why do you have to use pgadmin? You should very rarely have to go direct to the database.

Re: [Rails] migration problems

2017-04-28 Thread Joe Guerra
Got it working. I was just using the default settings that ror. It's much easier to deal with sqlite in development. I hate using PGAdmin for postgres. Thanks, Joe On Thursday, April 27, 2017 at 7:30:10 PM UTC-4, jim wrote: > > > > On Fri, Apr 28, 2017 at 9:17 AM, Joe Guerra > wrote: > >>

Re: [Rails] migration problems

2017-04-27 Thread Jim Ruther Nill
On Fri, Apr 28, 2017 at 9:17 AM, Joe Guerra wrote: > ok, I'm having difficulty with heroku, they are having some build > problems... > > I'll try later. I guess commenting out the # rename table in change def > should work? > > I was puzzled because the column title started with a capital letter

Re: [Rails] migration problems

2017-04-27 Thread Joe Guerra
ok, I'm having difficulty with heroku, they are having some build problems... I'll try later. I guess commenting out the # rename table in change def should work? I was puzzled because the column title started with a capital letter, it worked fine in sqlite, but generated errors in postgres

Re: [Rails] migration problems

2017-04-27 Thread Jim Ruther Nill
On Fri, Apr 28, 2017 at 8:54 AM, Joe Guerra wrote: > Hi, I got stuck on a migration (basically to fix a column name). I > actually went into the table itself and corrected the problem. My herkou > migration gets stuck, and I've got other migrations behind it that aren't > running. > If you've

Re: [Rails] migration problems

2017-04-27 Thread Mugurel Chirica
Can you share some code? There are more changes to receive help that way. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@goo

[Rails] migration problems

2017-04-27 Thread Joe Guerra
Hi, I got stuck on a migration (basically to fix a column name). I actually went into the table itself and corrected the problem. My herkou migration gets stuck, and I've got other migrations behind it that aren't running. What should I do? Thanks, Joe -- You received this message because

[Rails] Migration failed "Mysql2::Error: Incorrect key file for table"

2016-05-16 Thread Mendel
Hello, I am trying to run a migration on a db that has about 100K records. When I run the migration I get this error == 20160503165700 AddDetailsToTransactions: migrating = -- add_column(:transactions, :invoice_number, :string) rake aborted! StandardError: An error has

Re: [Rails] Re: Rails migration fault

2016-02-05 Thread Colin Law
On 5 February 2016 at 13:58, Yuri Redaelli wrote: > In order to fix what showed during RVM INFO I needed to move this line > > [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # > Load RVM into a shell session *as a function* > > at the bottom of my bash_profile Ah yes, that w

[Rails] Re: Rails migration fault

2016-02-05 Thread Yuri Redaelli
In order to fix what showed during RVM INFO I needed to move this line [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* at the bottom of my bash_profile See this topic http://stackoverflow.com/questions/18276701/getting-warning

[Rails] Re: Rails migration fault

2016-02-05 Thread Yuri Redaelli
Ok, thanks for your support. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@goog

Re: [Rails] Re: Re: Rails migration fault

2016-02-05 Thread Colin Law
On 5 February 2016 at 12:02, Yuri Redaelli wrote: > Colin Law wrote in post #1181211: >> On 5 February 2016 at 11:47, Colin Law wrote: >> [BUG] Segmentation fault > show (is 'which ruby' the right command on OSX for findinq which which ruby /usr/bin/ruby >>> >>> You are using th

[Rails] Re: Re: Rails migration fault

2016-02-05 Thread Yuri Redaelli
Colin Law wrote in post #1181211: > On 5 February 2016 at 11:47, Colin Law wrote: > [BUG] Segmentation fault show (is 'which ruby' the right command on OSX for findinq which >>> which ruby >>> /usr/bin/ruby >> >> You are using the wrong ruby. Since you are using rvm you should be >> usin

Re: [Rails] Re: Rails migration fault

2016-02-05 Thread Colin Law
On 5 February 2016 at 11:47, Colin Law wrote: > On 5 February 2016 at 10:55, Yuri Redaelli wrote: >> Colin Law wrote in post #1181203: >>> On 5 February 2016 at 09:43, Yuri Redaelli wrote: >>>> Hi all, >>>> >>>> for first sorry for my eng

Re: [Rails] Re: Rails migration fault

2016-02-05 Thread Colin Law
On 5 February 2016 at 10:55, Yuri Redaelli wrote: > Colin Law wrote in post #1181203: >> On 5 February 2016 at 09:43, Yuri Redaelli wrote: >>> Hi all, >>> >>> for first sorry for my english. >>> >>> I'm trying to create a Rails migrat

[Rails] Re: Rails migration fault

2016-02-05 Thread Yuri Redaelli
Colin Law wrote in post #1181203: > On 5 February 2016 at 09:43, Yuri Redaelli wrote: >> Hi all, >> >> for first sorry for my english. >> >> I'm trying to create a Rails migration but I encouter this error: >> >> .rvm/gems/ruby-1.9.3-p327@glo

[Rails] Re: Rails migration fault

2016-02-05 Thread Yuri Redaelli
Is it correct to have a config like this? RubyGems Environment: - RUBYGEMS VERSION: 2.0.14 - RUBY VERSION: 2.0.0 (2015-04-13 patchlevel 645) [universal.x86_64-darwin15] - INSTALLATION DIRECTORY: /Users/myname/.rvm/gems/ruby-1.9.3-p327@global - RUBY EXECUTABLE: /System/Library/Frameworks

Re: [Rails] Rails migration fault

2016-02-05 Thread Colin Law
On 5 February 2016 at 09:43, Yuri Redaelli wrote: > Hi all, > > for first sorry for my english. > > I'm trying to create a Rails migration but I encouter this error: > > .rvm/gems/ruby-1.9.3-p327@global/gems/json-1.8.0/lib/json/common.rb:67: > [BUG] Segmentation fault

[Rails] Rails migration fault

2016-02-05 Thread Yuri Redaelli
Hi all, for first sorry for my english. I'm trying to create a Rails migration but I encouter this error: .rvm/gems/ruby-1.9.3-p327@global/gems/json-1.8.0/lib/json/common.rb:67: [BUG] Segmentation fault ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15] -- Crash Repor

Re: [Rails] Migration with active records

2015-12-11 Thread Colin Law
On 11 December 2015 at 02:02, Manuel Shenavai wrote: > Hi everyone, > > I got a question regarding active records. Im new to ruby as well as active > records. > > As mentioned here, its possible to migrate database schema with active > records. > "Rails provides a domain-specific language for mana

[Rails] Migration with active records

2015-12-10 Thread Manuel Shenavai
Hi everyone, I got a question regarding active records. Im new to ruby as well as active records. As mentioned here , its possible to migrate database schema with active records. "Rails provides a domain-specific language fo

[Rails] migration and git

2015-12-05 Thread Martin
Hi there, I did the following using git in my rails application: - creating branch a from master - creating a migration - using it on development - creating a branch b from master - making fixes whih include a new migration (the migration number is higher than on branch a) - using it on developm

Re: [Rails] Rails migration issue with foreign key after moving from sqlite to mysql

2015-04-07 Thread Hassan Schroeder
On Tue, Apr 7, 2015 at 8:57 AM, Heptagone H wrote: > I used scaffolding to generate my models, controllers, views etc. Originally > I wrote the app to use sqlite3, but now that I want to move my app to a > production environment with mysql or even postgres, I keep on getting an > error involving

[Rails] Rails migration issue with foreign key after moving from sqlite to mysql

2015-04-07 Thread Heptagone H
Hi, As much as I like Rails, I'm not very proficient at databases/schemas and migrations. Right now the data inside the db does not matter as nothing has been populated yet, I'm just trying to get my app working. I used scaffolding to generate my models, controllers, views etc. Originally I w

Re: [Rails] migration problem

2014-11-30 Thread Roelof Wobben
Thanks, that did the trick. I use the beta versions because on the online tutorial from Hartl that versions are mentioned and he says not to use any other version to follow the tutorial. Roelof Op zondag 30 november 2014 23:47:59 UTC+1 schreef Daniel Evans: > I just encountered this issue a

Re: [Rails] migration problem

2014-11-30 Thread Daniel Evans
I just encountered this issue as well. This is due to an update in Arel. You should be able to solve it by adding an explicit version requirement to your Gemfile or drop back to a stable rails version as mentioned. gem 'arel', '6.0.0.beta2' On Sun, Nov 30, 2014 at 2:52 PM, Colin Law wrote: > On

Re: [Rails] migration problem

2014-11-30 Thread Colin Law
On 30 November 2014 at 20:54, Roelof Wobben wrote: > Hello, > > I have this migration file : > > class CreateUsers < ActiveRecord::Migration > def change > create_table :users do |t| > t.string :name > t.string :email > t.timestamps null: false > end > end > end > > b

[Rails] migration problem

2014-11-30 Thread Roelof Wobben
Hello, I have this migration file : class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string :name t.string :email t.timestamps null: false end end end but as soon as I do rake db:migrate I see this errors appear: bundle exec r

[Rails] Migration Trouble

2014-09-18 Thread Jan Yo
I'm having an issue with one migration. all other migrations work ok. Here's the output: == 20140905145859 CreateMemberships: migrating -- create_table(:memberships) -> 0.3010s == 20140905145859 CreateMemberships: migrated (0.3011s) === Bu

[Rails] Rails migration files generate into corresponding modular directories

2014-07-03 Thread Jianqiu Xiao
In a Ruby on Rails project, all migration files generate into the same directory 'db/migrate'. It's enough for simple projects, but not that good for large modulized projects. It is inconvenient to review thousands of files in the same directory for one project. It looks like: https://ruby-china-

[Rails] Rails migration files generate into corresponding modular directories

2014-07-03 Thread swordray
In a Ruby on Rails project, all migration files generate into the same directory db/migrate. It's enough for simple projects, but not that good for large modulized projects. It is inconvenient to review thousands of files in the same directory for one project. It looks like: https://ruby-china

Re: [Rails] Rails migration problem, Table doesn't exist

2013-10-14 Thread BalaRaju Vankala
Hello , I think *rake db:create* not *create:all* its better to use always *bundle exec rake db:create* and *bundle exec rake db:migrate* and *bundle exec rake db:seed* *or *instead of all these commands* *you can use also this command *bundle exec rake db:setup* On Sun, Oct 13, 2013 at 1:35 A

[Rails] Rails migration problem, Table doesn't exist

2013-10-14 Thread José María del Pozo
Hello, I'm starting with Rails. I have problems at the time of migration. The steps I follow are: rake db:create:all rake db:migrate then rake aborted! Mysql2::Error: Table 'lpaguide.resources' doesn't exist: SHOW FIELDS FROM `resources` /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-

[Rails] Re: Rails migration generation with options or defaults

2013-07-25 Thread Robert Walker
Kirankumar Skk wrote in post #1116632: > In Rails we have command to add migration that specifies the table name > column name. For example : > > $ rails generate migration AddPartNumberToProducts part_number:string > > *Problem: How to specify the options (example :after => :descritpion) on > comm

[Rails] Rails migration generation with options or defaults

2013-07-25 Thread Kirankumar Skk
scritpion endend *Problem: How to specify the options (example :after => :descritpion) on command line so that it will add directly on migration file.* FYI : I've asked the same question on stackoverflow Link http://stackoverflow.com/questions/17720849/rails-migration-generation-with

Re: [Rails] Migration?

2013-06-17 Thread Tamara Temple
Don't use migrations to set data, use seeds for that if you must. Using migrations can lead to inabilities to rollback if need be. The exceptions to this are cases where model relationships or default values need to be set to have the application work. Your example is not such a case. -- You rec

Re: [Rails] Migration?

2013-06-17 Thread Colin Law
On 17 June 2013 06:31, William Herry wrote: > try add `Project.reset_column_information` before Subject.create Or even Subject.reset_column_information Colin > > > On Mon, Jun 17, 2013 at 11:36 AM, Clay McCullough wrote: >> >> Hello, I am fairly new to rails, and I keep having an error in my >

Re: [Rails] Migration?

2013-06-16 Thread William Herry
try add `Project.reset_column_information` before Subject.create On Mon, Jun 17, 2013 at 11:36 AM, Clay McCullough wrote: > Hello, I am fairly new to rails, and I keep having an error in my > migrations, cant mass assign protected attributes... it does not show what > attribute is mass assigned

[Rails] Migration?

2013-06-16 Thread Clay McCullough
Hello, I am fairly new to rails, and I keep having an error in my migrations, cant mass assign protected attributes... it does not show what attribute is mass assigned, just shows the file that has the problem... here is the file any help would be greatly appreciated!! class Subjects < ActiveRe

Re: [Rails] Migration from SQLite to PostgreSQL

2013-04-30 Thread Arvind Vyas
change in database.yml , use the syntax which is needed for PG , and again run command bundle exec rake db:create bundle exec rake db:migrate On Tue, Apr 30, 2013 at 4:25 PM, botp wrote: > On Tue, Apr 30, 2013 at 8:21 AM, wrote: > >> I saw some of the tutorials on how to migrate from sqlite to

Re: [Rails] Migration from SQLite to PostgreSQL

2013-04-30 Thread botp
On Tue, Apr 30, 2013 at 8:21 AM, wrote: > I saw some of the tutorials on how to migrate from sqlite to postgresql, > but it is either for mac or it is for a new/fresh app. What if I already > have an App with data sqlite in it. I am using rails 3.2.2 and windows 7. > Anyone knows which is the bes

Re: [Rails] Migration from SQLite to PostgreSQL

2013-04-30 Thread Javier Quarite
Tue, Apr 30, 2013 at 3:21 AM, wrote: > I saw some of the tutorials on how to migrate from sqlite to postgresql, > but it is either for mac or it is for a new/fresh app. What if I already > have an App with data sqlite in it. I am using rails 3.2.2 and windows 7. > Anyone knows which is the best w

[Rails] Migration from SQLite to PostgreSQL

2013-04-30 Thread dil . takodil
I saw some of the tutorials on how to migrate from sqlite to postgresql, but it is either for mac or it is for a new/fresh app. What if I already have an App with data sqlite in it. I am using rails 3.2.2 and windows 7. Anyone knows which is the best way to migrate sqlite to postgresql? Thanks

Re: [Rails] migration problem

2012-11-13 Thread Colin Law
On 13 November 2012 18:18, Carlos Mathiasen wrote: > you need create_table meathod instead change_table. And since the users table does not already exist you should uncomment the t.timestamps line. Colin > > Matt's > > > > On Tue, Nov 13, 2012 at 3:08 PM, roelof wrote: >> >> Hello, >> >> I wan

Re: [Rails] migration problem

2012-11-13 Thread Carlos Mathiasen
you need create_table meathod instead change_table. Matt's On Tue, Nov 13, 2012 at 3:08 PM, roelof wrote: > Hello, > > I want to use username so I can log in with username. > So I made this migration file : > > class AddDeviseToUsers < ActiveRecord::Migration > def self.up > change_table

[Rails] migration problem

2012-11-13 Thread roelof
Hello, I want to use username so I can log in with username. So I made this migration file : class AddDeviseToUsers < ActiveRecord::Migration def self.up change_table(:users) do |t| ## Database authenticatable t.string :username,:null => false, :default => ""

Re: [Rails] Migration in Vendor folder

2012-09-11 Thread vijaya sekhar reddy mallidi
Hi keerthi, You are trying to integrate other plugins into your application? On Tue, Sep 11, 2012 at 5:06 PM, keerthi priya < emailtokeerthipr...@gmail.com> wrote: > There is app where i found few of the migrations and models are there in > vendor and those files are found in a MVC folders

Re: [Rails] Migration in Vendor folder

2012-09-11 Thread Colin Law
On 11 September 2012 12:36, keerthi priya wrote: > There is app where i found few of the migrations and models are there in > vendor and those files are found in a MVC folders. Please don't top post, it makes it difficult to follow the thread. Insert your reply inline at appropriate points in pre

Re: [Rails] Migration in Vendor folder

2012-09-11 Thread keerthi priya
There is app where i found few of the migrations and models are there in vendor and those files are found in a MVC folders. On Tue, Sep 11, 2012 at 12:41 PM, Colin Law wrote: > On 11 September 2012 05:27, sameena Khan > wrote: > > if this can be done even i wanna know how to do it. > > > > > >

Re: [Rails] Migration in Vendor folder

2012-09-11 Thread Colin Law
On 11 September 2012 05:27, sameena Khan wrote: > if this can be done even i wanna know how to do it. > > > On Mon, Sep 10, 2012 at 7:31 PM, keerthi priya > wrote: >> >> Hi all >> >> >> There are few migrations in Vendor folder and i want to run those >> migrations, do i need to copy those t

Re: [Rails] Migration in Vendor folder

2012-09-10 Thread sameena Khan
if this can be done even i wanna know how to do it. On Mon, Sep 10, 2012 at 7:31 PM, keerthi priya < emailtokeerthipr...@gmail.com> wrote: > Hi all > > > There are few migrations in Vendor folder and i want to run those > migrations, do i need to copy those to db folder and run them or ther

[Rails] Migration in Vendor folder

2012-09-10 Thread keerthi priya
Hi all There are few migrations in Vendor folder and i want to run those migrations, do i need to copy those to db folder and run them or there is another way to run the migration present in Vendor folder. Cheers, KP -- You received this message because you are subscribed to the Google

[Rails] Migration in vendor folder

2012-09-10 Thread keerthi priya
Hi all -- 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+unsubscr...@googlegroups.com. To view this dis

[Rails] Migration to N database instances

2012-04-11 Thread Danilo Assis
Hi, there! What is the best approach to execute a migration in several databases? I mean, I have a service that is shared between clientes (stores), but every store has its own db replica can be in different hosts (but they are all equal, both schema and software (mysql, for example)). The app i

Re: [Rails] migration trouble in the command line

2012-01-07 Thread Javier Quarite
You have to generate the scaffold because it generates the models/views/controllers I only use rails g resources when I have a many-to-many relation and it only creates the model/controller Glad you solve it =) Javier -- You received this message because you are subscribed to the Google Grou

Re: [Rails] migration trouble in the command line

2012-01-07 Thread Francesca Krihely
That was it! Thank you! I did it with the variable "user" but now I'm looking into my 'app' folder and there's nothing in the user layout, even though I generated the scaffold and the resource Thanks Francesca On Sat, Jan 7, 2012 at 11:27 PM, Javier Quarite wrote: > > > On Sat, Jan 7, 2012 at

Re: [Rails] migration trouble in the command line

2012-01-07 Thread Javier Quarite
On Sat, Jan 7, 2012 at 11:23 PM, Francesca Krihely wrote: > Happy Saturday > > Something weird is happening in my command line. After I create a resource > and do the migration, there is none of the typical: > > > So I guess you are doing rails g resource Post right? or what was it? Javi

[Rails] migration trouble in the command line

2012-01-07 Thread Francesca Krihely
Happy Saturday Something weird is happening in my command line. After I create a resource and do the migration, there is none of the typical: == CreatePosts: migrating -- create_table(:posts) -> 0.0019s == CreatePosts: migrated (0.0020s

Re: [Rails] rails migration from 2.3.4 to 3.1

2012-01-04 Thread Chirag Singhal
Hi Jesus, Here are the 4 RailsCasts on this topic, these will get you started: 1. http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1 - This screencast shows how to use rails_upgrade plugin to check the required changes and update your configuration to Rails 3, along with instructions

Re: [Rails] rails migration from 2.3.4 to 3.1

2012-01-04 Thread Benjamin Iandavid Rodriguez
This episode on railscasts.com describes exactly what you're looking for: http://railscasts.com/episodes/282-upgrading-to-rails-3-1?autoplay=true Hope this helps! Regards! 2012/1/4 Jesus Granados > I have a RoR app running over Rails 2.3.4 and ruby 1.8.6 .. I am > planning to migrate to Rails

[Rails] rails migration from 2.3.4 to 3.1

2012-01-04 Thread Jesus Granados
I have a RoR app running over Rails 2.3.4 and ruby 1.8.6 .. I am planning to migrate to Rails 3.1 What or how will be the best way to do it? is there any application that could help us to do this migration? Regards -- Posted via http://www.ruby-forum.com/. -- You received this message because

[Rails] Migration from MySQL to NoSQL

2011-12-13 Thread Satyaram B V
Hi All, We are working on a rails application using MySQL. It has become inevitable for us to use NoSQL DB for one of our models. Please note that performance is not yet the reason for us to move to NoSQL. I have the following questions: 1. Should we move all the models from MySQL to NoSQL; or hav

[Rails] Migration reports success but did not do anything

2011-10-31 Thread NY
I observed this a few times, but not always happen, and if I down the migration and run again, it often works. My migration is really simple like: Foo.find_each do |foo| foo.update_attribute(:bar, "baz") end Occasionally, it reports success, but not actually updated the attribute for the "bar"

Re: [Rails] migration and updating database

2011-10-25 Thread Peter Vandenabeele
On Tue, Oct 25, 2011 at 2:23 PM, fadwa ferodia wrote: > Hi, > I have an application using ruby on rails 3 (rubystack). I'm on windows > vista > I want to update the database and here is what I get after typing rake > db:seed --trace > > (in C:/Users/dell/BitNami RubyStack Development projects/ser

[Rails] migration and updating database

2011-10-25 Thread fadwa ferodia
Hi, I have an application using ruby on rails 3 (rubystack). I'm on windows vista I want to update the database and here is what I get after typing rake db:seed --trace (in C:/Users/dell/BitNami RubyStack Development projects/server) ** Invoke db:seed (first_time) ** Invoke db:abort_if_pending_mig

[Rails] Migration problem in Rails.3.1rc6 and JRuby

2011-08-24 Thread Guilherme
Hi, I'm using JRuby 1.6.3 and I've installed Rals 3.1rc6 (which required Arel 2.2.1) and created a new app with a simple migration file. When I run rake db:migrate it creates my table and then throws the following error: rake aborted! An error has occurred, this and all later migrations canceled:

[Rails] Re: RUBY ON RAILS MIGRATION

2011-08-17 Thread Matthew Higgins
I highly recommend against composite keys. The composite gem breaks in every new rails version, and has broken edge cases. Stick with an integer primary key, and an integer for foreign keys. I wrote the foreigner gem. It expects that you are following the Rails conventions. It has no effect on

Re: [Rails] Re: RUBY ON RAILS MIGRATION

2011-08-14 Thread Dheeraj Kumar
3. Yes. http://compositekeys.rubyforge.org/ On Sun, Aug 14, 2011 at 12:42 PM, Colin Law wrote: > On 14 August 2011 05:04, Nagesh Shenoy wrote: > > Thank you Walter and Colin for giving such a good idea. I ll try with > > foreigner gem and will go through rails guide. > > 1.)Actually i wanted to

Re: [Rails] Re: RUBY ON RAILS MIGRATION

2011-08-14 Thread Colin Law
On 14 August 2011 05:04, Nagesh Shenoy wrote: > Thank you Walter and Colin for giving such a good idea. I ll try with > foreigner gem and will go through rails guide. > 1.)Actually i wanted to confirm whether rails has support for > non-integer primary_key? It can be done, but don't do it unless

[Rails] Re: RUBY ON RAILS MIGRATION

2011-08-13 Thread Nagesh Shenoy
Thank you Walter and Colin for giving such a good idea. I ll try with foreigner gem and will go through rails guide. 1.)Actually i wanted to confirm whether rails has support for non-integer primary_key? 2.)Can default naming convention of primary_key in a model (modelname_id) can be overridden

Re: [Rails] RUBY ON RAILS MIGRATION

2011-08-13 Thread Colin Law
On 13 August 2011 11:48, Nagesh Shenoy wrote: > Hello, > I am beginner to Ruby on rails doing a  rails project with postgreSQL as > back-end. I want to have two tables Table1 and Table2. Table1 has a > column named say SUPPLIERNAME which is of string type, which should be > referenced in table2 as

Re: [Rails] RUBY ON RAILS MIGRATION

2011-08-13 Thread Walter Lee Davis
On Aug 13, 2011, at 6:48 AM, Nagesh Shenoy wrote: Hello, I am beginner to Ruby on rails doing a rails project with postgreSQL as back-end. I want to have two tables Table1 and Table2. Table1 has a column named say SUPPLIERNAME which is of string type, which should be referenced in table2 as

[Rails] RUBY ON RAILS MIGRATION

2011-08-13 Thread Nagesh Shenoy
Hello, I am beginner to Ruby on rails doing a rails project with postgreSQL as back-end. I want to have two tables Table1 and Table2. Table1 has a column named say SUPPLIERNAME which is of string type, which should be referenced in table2 as FOREIGN KEY. Can any one please help me out to create mi

Re: [Rails] Migration to rails2 rails3

2011-07-28 Thread Chirag Singhal
Great, copy over the changes and post again if you get stuck anywhere else. Chirag http://sumeruonrails.com On Thu, Jul 28, 2011 at 5:39 PM, Rodrigo Martins wrote: > Chirag, Thank you, > > Differences between the Rakefile to rails2 rails3. > > Rails2 the Rakefile: > require(File.join(File.dir

Re: [Rails] Migration to rails2 rails3

2011-07-28 Thread Rodrigo Martins
Chirag, Thank you, Differences between the Rakefile to rails2 rails3. Rails2 the Rakefile: require(File.join(File.dirname(__FILE__), 'config', 'boot')) require '...' Rails3 the Rakefile: require File.expand_path('../config/application', __FILE__) ::Application.load_tasks brother won ... link:

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Chirag Singhal
Everything looks good here. What all did you do when upgrading from rails 2 to rails 3? There are a lot of changes in the script and config folders between the two versions. Generate a new rails3 app, copy over everything from the script folder into script folder of your app. Then try installing t

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Rodrigo Martins
Attached files -- * Atenciosamente* ___ Rodrigo Martins www.rrmartins.com tel: (28) 9882-6202 (27) 9601-9573 My profiles: [image: Facebook] [image: Twitter] Contact me: [image: Google Ta

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Chirag Singhal
Can you attach your config/environment.rb file and Gemfile? Chirag http://sumeruonrails.com On Wed, Jul 27, 2011 at 5:43 PM, Rodrigo Martins wrote: > when I run the first command you gave me appears the help of the rails, > and apparently does not install, and the second an error. > > I put d

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Rodrigo Martins
when I run the first command you gave me appears the help of the rails, and apparently does not install, and the second an error. I put down the errors and the versions of ruby and rails. rodrigo@rrmartins:~/Documentos/vota_prato2$ sudo ruby script/rails plugin install git://github.com/rails/rail

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Chirag Singhal
If you have already upgraded your application to Rails 3, then you have to use the new syntax to install the plugin: rails plugin install git://github.com/rails/rails_upgrade.git or ruby script/rails plugin install git://github.com/rails/rails_upgrade.git Chirag http://sumeruonrails.com On W

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Rodrigo Martins
good day When I try to install a plugin error, and when I try to install as root also of a system error. running down this without being root: *rodrigo@rrmartins:~/Documentos/vota_prato2$ ruby script/plugin install git://github.com/rails/rails_upgrade.git :29:in `require': no such file to load -

Re: [Rails] Migration to rails2 rails3

2011-07-26 Thread Chirag Singhal
Install rails upgrade plugin, it will convert your old routes, environment and other config files to new Rails 3 format. Read the instructions on plugin's homepage for more info. https://github.com/rails/rails_upgrade Chirag http://sumeruonrails.com On Wed, Jul 27, 2011 at 7:00 AM, Rodrigo Ma

[Rails] Migration to rails2 rails3

2011-07-26 Thread Rodrigo Martins
Good evening everyone, I went to change the Rails version of my project, and saw that many things have stopped working. As the "rake routes", which is giving the following error: rrmartins rodrigo @: ~ / Documents / vota_prato $ rake routes rake aborted! no such file to load - tasks / rails (See

[Rails] migration options

2011-07-14 Thread Rodrigo Ruiz
Does anyone know where I can find all the options for each migration type? for example :limit => 30 where I could use like that: t.string :name, :limit => 30 I'd like to know the options similar to :limit => 30 Thank you, Rodrigo -- You received this message because you are subscribed to th

[Rails] migration to change data type of existing column from string to text

2011-05-17 Thread sol.manager
I have been poking around the rails guides section on migrations (http://guides.rubyonrails.org/v2.3.8/migrations.html#changing-tables) and trying to make sure I have the proper syntax to change a column type for an existing field from string to text (without losing data already entered). What is t

[Rails] Migration error

2011-04-28 Thread amrit pal pathak
Run it to generate a new migration 1)rails generate migration add_price_to_product price:decimal 2)Added following to migration file class AddPriceToProduct < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision => 8, :scale => 2, :default => 0 end def self.do

[Rails] Migration error

2011-04-28 Thread amrit pal pathak
Run it to generate a new migration 1)rails generate migration add_price_to_product price:decimal 2)Added following to migration file class AddPriceToProduct < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision => 8, :scale => 2, :default => 0 end def self.do

[Rails] Re: Ruby on rails migration problem

2011-04-09 Thread sagar
Thank you so much.. This solved my problem ... :) On Apr 9, 8:02 am, MissingHandle wrote: > or if you ran the migration properly - maybe it's a mass assignment > issue? > > if you have attr_accessible in your model and you haven't added these > new attributes to be accessible then you would be ge

[Rails] Re: Ruby on rails migration problem

2011-04-08 Thread MissingHandle
or if you ran the migration properly - maybe it's a mass assignment issue? if you have attr_accessible in your model and you haven't added these new attributes to be accessible then you would be getting these errors. On Apr 8, 3:50 am, sagar wrote: > Hello all, > > I have created a migration add

Re: [Rails] Ruby on rails migration problem

2011-04-08 Thread vishal singh
use add_detail_to_users > > -- 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+unsubscr...@googlegroups.

[Rails] Ruby on rails migration problem

2011-04-08 Thread sagar
Hello all, I have created a migration add_details _to users ... ( city_id , profession ) and then migrated it.. when i use params[:user] to update the database by taking user inputs from forms in views, it is not updating the database for these city_id and profession... ( not changing from null )

Re: [Rails] Rails migration from 2.2.2 to 2.3.8

2011-02-28 Thread Bryan Crossland
On Mon, Feb 28, 2011 at 12:04 PM, erik wrote: > I have an app that has been around a while that I'm migrating for > Rails 2.3.8. There have been a lot of interesting issues, but I'm on > the home stretch, but have now run into some very odd errors. > What version of Rails was your app in before

[Rails] Re: Rails migration from 2.2.2 to 2.3.8

2011-02-28 Thread erik
I noticed that if i take the :work => :environment part out of the rake task and instead in the task do block require the environment file by hand (e.g. require(File.join(RAILS_ROOT, 'config', 'environment'))) it works fine. All of a sudden all of my class methods are available. this is very dist

[Rails] Rails migration from 2.2.2 to 2.3.8

2011-02-28 Thread erik
I have an app that has been around a while that I'm migrating for Rails 2.3.8. There have been a lot of interesting issues, but I'm on the home stretch, but have now run into some very odd errors. The gist is when I run a task with rake it fails, but when I run the same code form the console it w

[Rails] migration numbers

2010-07-30 Thread Dis Tec
Why do the migration numbers not appear. I am following the famous depot example, but I am finding that when I migrate the database using rake db:migrate I get a createproducts file with a long integer string before the .rb file, i.e. 20100730085920_create_products.rb. How do I get this changed. Se

[Rails] Migration: updating a column

2010-07-29 Thread Eric Yen
Hi, Is there a way to "update" a column? Here's what I mean: I have a column name "item" in table "products" of type "integer" Now I want to update the column to have the option ":null => false" So far, the only way I have found is to remove it and re-add it, but obviously that is quite dumb.

Re: [Rails] Migration not creating new user object

2010-05-18 Thread Rob Biedenharn
On May 18, 2010, at 11:19 PM, Ali Akhtarzada wrote: Hi Rob, That would make more sense creating the Administrator at the time of the users migration, but I'm following a book and the roles were created later so I suppose the author just figured he'd throw it in there or something. I do n

Re: [Rails] Migration not creating new user object

2010-05-18 Thread Ali Akhtarzada
Hi Rob, That would make more sense creating the Administrator at the time of the users migration, but I'm following a book and the roles were created later so I suppose the author just figured he'd throw it in there or something. I do not have logic that prevents the admin from being deleted at th

  1   2   >