Wiki Forum Sign up! Explore Home

Not signed in (Sign In)

LiveSearch

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.2 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthordarkpollo
    • CommentTimeApr 17th 2008
     permalink
    rake db:migrate --trace
    (in /home/darkpollo/cit)
    ** Invoke db:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    ** Execute db:migrate
    == 97 CacheMilestoneProjectStats: migrating ============================ =======
    -- add_column(:projects, :critical_count, :integer, {:default=>0})
    rake aborted!
    Mysql::Error: Duplicate column name 'critical_count': ALTER TABLE `proje cts` ADD `critical_count` int(11) DEFAULT 0
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/connecti on_adapters/abstract_adapter.rb:150:in `log'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/connecti on_adapters/mysql_adapter.rb:281:in `execute'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/connecti on_adapters/abstract/schema_statements.rb:124:in `add_column'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:285:in `method_missing'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:265:in `say_with_time'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:265:in `say_with_time'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:281:in `method_missing'
    ./db/migrate//097_cache_milestone_project_stats.rb:3:in `up_without_benc hmarks'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:219:in `migrate'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:219:in `migrate'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:348:in `migrate'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:339:in `migrate'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:307:in `up'
    /home/darkpollo/cit/vendor/rails/activerecord/lib/active_record/migratio n.rb:298:in `migrate'
    /home/darkpollo/cit/vendor/rails/railties/lib/tasks/databases.rake:85
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke'
    /usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exc eption_handling'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exc eption_handling'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
    /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
    /usr/bin/rake:19


    How can i fixed it?
    Thanks.
    • CommentAuthoradmin
    • CommentTimeApr 18th 2008
     permalink
    Hmm. I wonder why/how you already have that column as it's introduced in the migration refusing to run.

    Anyways, to get around it, try this in your database:
    update schema_info set version=97;
    and you'll skip this migration as you somehow already have it.

    -- Erlend
    • CommentAuthordarkpollo
    • CommentTimeApr 18th 2008
     permalink
    :)
    I wonder also... i made the last darcs pull two months ago... :O

    So, to confirm:
    i only need to update schema_info (in the MySQL admin?) and NOT to make the db:migrate?
    • CommentAuthoradmin
    • CommentTimeApr 18th 2008
     permalink
    You need to skip over revision 97 (which for some reason you already have) and then migrate the rest like normal.

    So, either update the schema_info so it looks like you've already applied the migration, or manually remove the columns introduced in db/migrate/097... and re-run the migration.

    -- Erlend
    • CommentAuthordarkpollo
    • CommentTimeApr 18th 2008 edited
     permalink
    Edited:
    I have just readed your post. :)

    It seems that the migrate is not completed as i cannot see the google widget and everything seem to work as before the pull...
    Thanks
    • CommentAuthoradmin
    • CommentTimeApr 18th 2008
     permalink
    I haven't added the google widget icon to the overview in the Darcs version, as most people who have local installs don't have a publicly available server.

    If you look in app/controllers/feeds_controller.rb at the bottom there should be some igoogle functions. If those are there you have support for the widget. You'll have to manually set the publicly available hostname for your server in app/views/igoogle.rhtml (at the bottom - url) as there currently isn't a configuration option for a publicly visible address, only the base domain.

    -- Erlend
    • CommentAuthordarkpollo
    • CommentTimeApr 18th 2008
     permalink
    Anyways, to get around it, try this in your database:
    update schema_info set version=97;


    Where do i have to write that?

    I have found this at line 337:
    def igoogle_feed
    if params[:up_uid].nil? || params[:up_uid].empty?
    render :text => "Please enter your widget key in this gadgets settings. The key can be found on your <a href=\"http://www.clockingit.com\">ClockingIT</a> preferences page.", :layout => false
    return
    end


    i have updated also the igoogle.rhtml but i need the key that i found in user settings.
    Thanks
    • CommentAuthoradmin
    • CommentTimeApr 18th 2008
     permalink
    To update the schema, you need to use something to connect to the database. Like the mysql client, or phpmyadmin.

    To get the widget key, add something like :
    <p><label "><%=_ 'Widget Key' %></label><div style="float:left;margin-top:3px;"><%= @user.autologin %></div></p>
    to app/views/users/_user_information.rhtml

    -- Erlend
    • CommentAuthordarkpollo
    • CommentTimeApr 18th 2008 edited
     permalink
    I have phpMyadmin and two databases clockingit and i have already done the update and it works. :D
    thanks!

    About the widget:
    It is not working. I have this error when i try this url:
    www.mydomain.com/feeds/igoogle
    Expected /home/darkpollo/cit/app/controllers/feeds_controller.rb to define FeedsController

    vendor/rails/activesupport/lib/active_support/dependencies.rb:249:in `load_missing_constant'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
    vendor/rails/activesupport/lib/active_support/inflector.rb:257:in `constantize'
    vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:148:in `constantize'
    vendor/rails/actionpack/lib/action_controller/routing.rb:1426:in `recognize'
    vendor/rails/actionpack/lib/action_controller/dispatcher.rb:170:in `handle_request'
    vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
    vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
    vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/rails.rb:76:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/rails.rb:74:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:155:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:154:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:281:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:281:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:264:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/configurator.rb:282:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/configurator.rb:281:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:128:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/command.rb:212:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:281
    vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
    vendor/rails/railties/lib/commands/servers/mongrel.rb:64
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
    vendor/rails/railties/lib/commands/server.rb:39
    script/server:3


    Thanks again!
    • CommentAuthoradmin
    • CommentTimeApr 18th 2008
     permalink
    That error means it was unable to parse the FeedsController earlier. Look for the first request in the log, not the later ones.

    -- Erlend
  1.  permalink
    I got this error when trying to db:migrate.

    Look:
    fw:/dados/cit# rake db:migrate
    (in /dados/cit)
    rake aborted!
    Multiple migrations have the version number 98
  2.  permalink
    Don't worry. Its ok now.

    Thanks!
    • CommentAuthoradmin
    • CommentTimeJun 12th 2008
     permalink
    That should only happen if you've added some migrations of your own, and should stop happening once I get around to upgrading to Rails 2.1

    -- Erlend
    • CommentAuthordarkpollo
    • CommentTime5 days ago
     permalink
    I had to reset the git pull and now i have this error on rake db:migrate:
    <code>
    rake db:migrate
    == 1 CreateMilestones: migrating ==============================================
    -- create_table(:milestones)
    rake aborted!
    Mysql::Error: Table 'milestones' already exists: CREATE TABLE `milestones` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `company_id` int(11), `project_id` int(11), `user_id` int(11), `name` varchar(255), `description` text, `due_at` datetime, `position` int(11)) ENGINE=InnoDB

    (See full trace by running task with --trace)</code>

    I have check the database and schema info shows 130.
    And git pull says it is updated.
    • CommentAuthordarkpollo
    • CommentTime5 days ago
     permalink
    more info:
    <code>(in /home/darkpollo/AGORA/cit)
    You have 131 pending migrations:
    1 CreateMilestones
    2 TaskDescription
    3 FixNonNullBody
    4 AddTimezone
    5 UserInterfaceType
    6 UserExternalClients
    7 UserShowCalendar
    8 ClientCss
    9 AddTasksCompanyId
    10 AddCompanyLogo
    11 AddWorkLogType
    12 AddComponentsPosition
    13 AddSessions
    14 AddBasicIndexes
    15 CreateShouts
    16 OptionHideTooltips
    17 AddTaskPriority
    18 ChangeDurationToMinutes
    19 CreateNewsItems
    20 AddUserSeenNewsId
    21 CreateProjectPermissions
    22 AddSelectedProject
    23 AddUserLastSeen
    24 AddTaskCreatedBy
    25 AddUserPing
    26 AddCompanySubdomain
    27 AddLastMilestoneAndView
    28 CreateTags
    29 PriorityFix
    30 AddSeverityAndType
    31 UpdateLogTypes
    32 AddTaskNumber
    33 CreateViews
    34 AddTaskStatus
    35 UpdateTaskStatus
    36 AddTaskRequiredBy
    37 AddTasksCreatedBy
    38 AddNotifications
    39 AddExternalWatchers
    40 AddTaskFiles
    41 AddProjectFinePermissions
    42 AddDateFormat
    43 InitialScmModel
    44 ScmIndexes
    45 AddWorklogChangesetId
    46 AddTaskMultipleOwners
    47 AddTaskOwnerIndexes
    48 NotificationPrefs
    49 AddUuid
    50 AddWelcomeSplash
    51 AddTaskTagsIndexes
    52 AddProjectPermissionIndexes
    53 AddPagesIndexes
    54 AddViewsIndexes
    55 AddMilestonesIndexes
    56 AddWorkLogsCompanyIdIndex
    57 AddTasksProjectIdIndex
    58 AddWorkLogIndexes
    59 AddProjectFilesCompanyIdIndex
    60 AddTasksCompanyIdIndex
    61 AddShoutsCompanyIdIndex
    62 AddGeneratedReports
    63 RemoveComponentReferences
    64 AddGeneratedReportCreatedAt
    65 DropTasksUserId
    66 AddProjectAndMilestoneCompletedAt
    67 AddUserLocale
    68 CreateWikiPages
    69 CreateWikiReferences
    70 AddWorkedNiceOption
    71 AddWorkdayDuration
    72 AddTaskDependencies
    73 AddTaskRepeat
    74 MoveFilesOutOfDb
    75 ViewsHideDependencies
    76 CreateProjectFolders
    77 AddProjectFileMimeType
    78 ChangeFoldersToActsAsTree
    79 CreateIcalEntries
    80 DropBinariesAndThumbnails
    81 ImportBeastSchema
    82 InitializeForums
    83 AddViewsSortColumn
    84 AddNewsletterOption
    85 AddAvatarsOption
    86 AddTaskHideUntil
    87 CreateShoutChannels
    88 AddChannelUsers
    89 AddWorksheetPause
    90 CreateEventLogs
    91 WorkLogToEventLog
    92 AddUploadUserId
    93 ImportOldEvents
    94 AddAutologinHash
    95 CreateTodos
    96 CreateEmails
    97 CacheMilestoneProjectStats
    98 AddForumMonitorships
    99 CreateWidgets
    100 AddProjectDescription
    101 AddRememberMe
    102 AddIndexes
    103 AddTagIndexes
    104 AddCompanySettings
    105 RemoveOptionShowCalendar
    106 AddWikiChangeSummary
    107 FixRestoreFromArchiveEvents
    108 CreateChats
    109 CreateChatMessages
    110 AddCompanyMessagingOption
    111 AddUserFloatingChatOption
    112 AddWeekDaysOption
    113 AddWorkLogCommentFlag
    114 SetCommentFlagForWorkLogs
    115 AddAutoCreateForumsOption
    116 ConvertEarlierWorkDurations
    117 LimitOnlineUsers
    118 CreateLocales
    119 TranslateWidgets
    120 AddLocaleSameAsEnglish
    121 AddArchiveMessages
    122 AddEnableSoundsOption
    123 AddGoogleGadgets
    124 AddPublicFlagForNews
    125 AddTempDueDatesForScheduling
    126 ConvertWikiNotesToHtml
    127 CacheWorkedDuration
    128 RecacheWorkedMinutes
    129 AddUserCanCreateProjects
    130 AddTaskTypeIconPreference
    131 AddTodoCompletedBy
    Run "rake db:migrate" to update your database then try again.
    </code>
    • CommentAuthoradmin
    • CommentTime3 days ago
     permalink
    Rails was upgraded to 2.2, and switched migration tracking scheme.

    mysql -u root -p <citdb>
    drop table schema_migrations
    <ctrl-d>
    rake db:migrate


    Should do the trick if my memory serves me right.

    -- Erlend
    • CommentAuthordarkpollo
    • CommentTime2 days ago
     permalink
    I will try this tonight.
    thanks.