I have problems with getting db:structure:dump to work.
I and getting this error:
C:\Sites\care>rake db:structure:dump --trace
Creating scope :search. Overwriting existing method PgSearch::Document.search.
** Invoke db:structure:dump (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:structure:dump
rake aborted!
Permission denied - pg_dump -i -s -x -O -f C:/Sites/care/db/structure.sql care_development
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/railties/databases.rake:389:in `block (3 levels) in <top (required)>'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
C:/RailsInstaller/Ruby1.9.3/bin/rake:19:in `load'
C:/RailsInstaller/Ruby1.9.3/bin/rake:19:in `<main>'
Tasks: TOP => db:structure:dump
If I run it like this in CMD, it works:
cd C:\Program Files (x86)\PostgreSQL\9.1\bin
pg_dump.exe -i -s -x -O -f C:/Sites/care/db/structure.sql care_development
I have tried changing the permission on both the pg_dump.exe folder/file and the rails folder/files. But doesn't seem to make any different. Tried adding full permissions for Users, System and even Everyone.
I also tried adding --username params to the pg_dump call (in the rake code) and adding Login Roles that match my windows user in pgAdminIII.
(I'm on Windows 7, Rails 3 and postgreSQL 9)
Do anyone know what the problem can be?
I have same problem on my Linux machine:
Then i used the following command to make it run:
su
>> I logged in first with my Admin user
su -postgres
I save my .sql file in my /tmp folder
For dumping the .sql file in database i run the command
psql -u postgres -d my_db_name -a -f /tmp/path_to_sql_file
It works greatly for me. Hope it may help you.
Related
Please help.
I wanted to set up in Redmine 4.1.1 an email read.
This is my code that I am executing in CLI:
bundle exec rake -f Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" host=outlook.office365.com port=993 username=user#domain.com password=PASSWORD ssl=1 project=mars-test-do-not-delete folder=main move_on_success=completed move_on_failure=failed no_permission_check=1 unknown_user=accept no_account_notice=1 --trace
But I am getting this output when I execute the code:
** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_imap
rake aborted!
NameError: uninitialized constant Redmine::IMAP
/home/seven/redmine/lib/tasks/email.rake:121:in `block (4 levels) in <top (required)>'
/home/seven/redmine/app/models/mailer.rb:630:in `with_synched_deliveries'
/home/seven/redmine/lib/tasks/email.rake:120:in `block (3 levels) in <top (required)>'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
Tasks: TOP => redmine:email:receive_imap
This is only half of the output.
Any ideas? Suggestions? Anything :)
The SMTP works without any problems. I am using an Exchange MS server for email.
Thank you.
As an update:
I set up a new server ubuntu 20.04 LTS
Installed redmine 4.0.6
Ruby 2.5.0
rake 13.0.1
Now when I run:
rake -f Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" host=outlook.office365.com port=993 username=EMAIL_USER password=PASSWORD ssl=true project=mars-test-do-not-delete folder=main move_on_success=processed move_on_failure=failed no_permission_check=1 unknown_user=accept 1 > /dev/null
I get this:
Your Gemfile lists the gem redmine_crm (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
rake aborted!
NameError: uninitialized constant Redmine::IMAP
/home/seven/redmine/lib/tasks/email.rake:121:in `block (4 levels) in <top (required)>'
/home/seven/redmine/app/models/mailer.rb:612:in `with_synched_deliveries'
/home/seven/redmine/lib/tasks/email.rake:120:in `block (3 levels) in <top (required)>'
/home/seven/.rvm/gems/ruby-2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/seven/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `eval'
/home/seven/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => redmine:email:receive_imap
(See full trace by running task with --trace)
I didi check the redmine_crm, to mu surprise in the Gemfile I have only one reference to it, so I do not fully understand why I get this error to;/
I found the problem.
In file:
/ROOT_PATH_TO_REDMINE/lib/tasks/email.rake
I needed to add one line on the top of the file:
require 'redmine/imap.rb'
That solved the problem.
I want to try get Rails and MSSQL talking within our CI tool, CircleCI. I work on a mac, so setting this up was fairly pain free. I installed FreeTDS locally using Homebrew. Then I spawned up a MSSQL docker image and set my config in my rails app to point to it and that all worked.
CircleCI is a little different.
I have done the following.
In my gemfile added:
# mssql database gems
gem 'tiny_tds'
gem 'activerecord-sqlserver-adapter'
Modified our database.yml file with:
default: &default
adapter: sqlserver
pool: 5
encoding: utf8
mode: dblib
development:
<<: *default
host: localhost
database: collections_development
username: sa
password: P#55w0rd
test:
<<: *default
host: localhost
database: collections_test
username: sa
password: P#55w0rd
I built a docker image with:
FROM circleci/ruby:2.4.1-node-browsers
RUN set -ex \
&& sudo apt-get install build-essential \
&& sudo apt-get install libc6-dev \
&& sudo wget -O freetds-1.00.54.tar.gz "ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.54.tar.gz" \
&& sudo tar -xzvf freetds-1.00.54.tar.gz \
&& cd freetds-1.00.54 \
&& sudo ./configure \
&& sudo make \
&& sudo make install
This image is hosted on docker hub here.
Next I built the CircleCI config:
version: 2
jobs:
build:
working_directory: ~/collections-api
docker:
- image: legendaryrob/ruby:2.4.1-node-browser-freetds54-lib6c
environment:
RAILS_ENV: test
- image: microsoft/mssql-server-linux
environment:
ACCEPT_EULA: Y
SA_PASSWORD: P#55w0rd
environment:
RAILS_ENV: test
steps:
- checkout
- restore_cache:
name: Restore bundle cache
keys:
- collections-api-bundle-{{ checksum "Gemfile.lock" }}
- run:
name: Allow CI to read from pdg gemserver
command: bundle config https://gems.pdg.io/ $GEMS_USERNAME:$GEMS_PASSWORD
- run:
name: Bundle Install
command: bundle install --path vendor/bundle --jobs 4 --retry 3
- save_cache:
name: Store bundle cache
key: collections-api-bundle-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: Wait for DB
command: dockerize -wait tcp://localhost:1433 -timeout 1m
- run:
name: test tds connection
command: tsql -C
# Run setup
- run: ./spec/setup/circle_setup.sh
- run:
name: Create the database
command: bundle exec rake -v --trace db:create
- run:
name: Migrate the database
command: bundle exec rake -v --trace db:migrate
- run:
name: Check environment variables are present
command: bundle exec rake env_variables:check
- run:
name: Run tests
command: bundle exec rspec
The MSSQL docker image I am getting from Microsoft's docker hub account directly -> https://hub.docker.com/r/microsoft/mssql-server-linux/
Here you can see a couple things. I set ruby box I built with TDS installed and all the dependancies needed. I ensured that we are using the same version of TDS that we are using locally, because it is working locally, I have also tried a few of the other versions just incase I was dealing with a flakey version.
I also ensure that we can connect to the MSSQL docker box and ensure that we have the right tds config:
- run:
name: Wait for DB
command: dockerize -wait tcp://localhost:1433 -timeout 1m
- run:
name: test tds connection
command: tsql -C
This will result in the following:
#!/bin/bash -eo pipefail
dockerize -wait tcp://localhost:1433 -timeout 1m
enter code here
2017/09/01 09:25:40 Waiting for: tcp://localhost:1433
2017/09/01 09:25:40 Problem with dial: dial tcp 127.0.0.1:1433:
getsockopt: connection refused. Sleeping 1s
2017/09/01 09:25:41 Problem with dial: dial tcp 127.0.0.1:1433:
getsockopt: connection refused. Sleeping 1s
2017/09/01 09:25:42 Problem with dial: dial tcp 127.0.0.1:1433:
getsockopt: connection refused. Sleeping 1s
2017/09/01 09:25:48 Connected to tcp://localhost:1433
and
#!/bin/bash -eo pipefail
tsql -C
[TinyTds][v2.0.0][tsql]: /usr/local/bin/tsql
Compile-time settings (established with the "configure" script)
Version: freetds v1.00.54
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: auto
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no
OpenSSL: yes
GnuTLS: no
MARS: no
But then I get timeouts. These timeouts are intermittent, they will sometimes occur when we are trying to connect to localhost:1433
But mostly it occurs when we get to the rake tasks.
Below is the stack trace I am getting, I have tried a few different versions of MSSQL docker as well with no effect. If anyone has tried doing this please let me know I would really appreciate some help around doing this.
#!/bin/bash -eo pipefail
bundle exec rake -v --trace db:create
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
TinyTds::Error: Adaptive Server connection timed out: CREATE DATABASE [collections_test]
Couldn't create database for {"adapter"=>"sqlserver", "pool"=>5, "encoding"=>"utf8", "mode"=>"dblib", "host"=>"localhost", "database"=>"collections_test", "username"=>"sa", "password"=>"P#55w0rd"}
rake aborted!
ActiveRecord::StatementInvalid: TinyTds::Error: Adaptive Server connection timed out: CREATE DATABASE [collections_test]
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:274:in `do'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:274:in `raw_connection_do'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:215:in `block in do_execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block (2 levels) in log'
/usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:611:in `block in log'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:603:in `log'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:215:in `do_execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_tasks.rb:10:in `create_database'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/tasks/sqlserver_database_tasks.rb:22:in `create'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:117:in `create'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:137:in `block in create_current'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:304:in `block in each_current_configuration'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:303:in `each'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:303:in `each_current_configuration'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:136:in `create_current'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/railties/databases.rake:27:in `block (2 levels) in <top (required)>'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/bin/rake:23:in `load'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/bin/rake:23:in `<top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:362:in `exec'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:22:in `dispatch'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:13:in `start'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:30:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
TinyTds::Error: Adaptive Server connection timed out
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:274:in `do'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:274:in `raw_connection_do'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:215:in `block in do_execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block (2 levels) in log'
/usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:611:in `block in log'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:603:in `log'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_statements.rb:215:in `do_execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/connection_adapters/sqlserver/database_tasks.rb:10:in `create_database'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-sqlserver-adapter-5.1.1/lib/active_record/tasks/sqlserver_database_tasks.rb:22:in `create'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:117:in `create'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:137:in `block in create_current'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:304:in `block in each_current_configuration'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:303:in `each'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:303:in `each_current_configuration'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:136:in `create_current'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/railties/databases.rake:27:in `block (2 levels) in <top (required)>'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/bin/rake:23:in `load'
/home/circleci/collections-api/vendor/bundle/ruby/2.4.0/bin/rake:23:in `<top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:362:in `exec'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:22:in `dispatch'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:13:in `start'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:30:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:create
Exited with code 1
Note: The reason we are needing to connect to MSSQL is because we are going to be writing to the db for a short time, we have another team who relies on Access that is using MSSQL. I am just hoping there is someone else out there who has fought this beast and won.
EDIT: freetds.conf
# $Id: freetds.conf,v 1.12 2007-12-25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
tds version = auto
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# If you experience TLS handshake errors and are using openssl,
# try adjusting the cipher list (don't surround in double or single quotes)
# openssl ciphers = HIGH:!SSLv2:!aNULL:-DH
# A typical Sybase server
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 5.0
# A typical Microsoft server
[egServer70]
host = ntmachine.domain.com
port = 1433
tds version = 7.0
No idea why but a current already bower-rails installed project can't do bower:install anymore !
As it worked before, I already have packages installed locally.
No idea wht is going one. NO changes as been made !
Tried to reinstall npm and bower, no changes !
rake bower:install
bower.js files generated
/usr/local/bin/bower install -p
bower ENOTFOUND Package dsl-generated dependencies=./vendor/assets/bower.json not found
rake aborted!
Command failed with status (1): [/usr/local/bin/bower install -p ...]
Tasks: TOP => bower:install:production
(See full trace by running task with --trace)
I DO have a bower.json in my /vendor/assets/ directory.
npm -v
1.4.14
bower -v
1.3.11
Here is the full trace:
rake bower:install --trace
** Invoke bower:install (first_time)
** Execute bower:install
** Invoke bower:install:production (first_time)
** Execute bower:install:production
bower.js files generated
/usr/local/bin/bower install -p
bower ENOTFOUND Package dsl-generated dependencies=./vendor/assets/bower.json not found
rake aborted!
Command failed with status (1): [/usr/local/bin/bower install -p ...]
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/file_utils.rb:54:in `block in create_shell_runner'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/file_utils.rb:45:in `call'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/file_utils.rb:45:in `sh'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/tasks/bower.rake:36:in `block (4 levels) in <top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:32:in `instance_exec'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:32:in `block in perform'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:57:in `block (2 levels) in dsl_perform_command'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:56:in `chdir'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:56:in `block in dsl_perform_command'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:55:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:55:in `dsl_perform_command'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:31:in `perform'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:10:in `perform'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/tasks/bower.rake:35:in `block (3 levels) in <top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/tasks/bower.rake:11:in `block (2 levels) in <top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
./bin/rake:4:in `<main>'
Tasks: TOP => bower:install:production
Same when I try to rake bower:list
rake bower:list
/usr/local/bin/bower list
bower check-new Checking for new versions of the project dependencies..
bower ENOTFOUND Package dsl-generated dependencies=./vendor/assets/bower.json not found
rake aborted!
Command failed with status (1): [/usr/local/bin/bower list...]
Tasks: TOP => bower:list
(See full trace by running task with --trace)
Maybe too late, but I'll leave it here, since I had similar issues using bower-rails, when running:
rake bower:install.
The solution I found on the web is running:
sudo apt-get install nodejs-legacy
Hope it's helpful for someone else in the same situation.
you can install nodejs by nvm, apt-get can't install all packages of nodejs.
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
source ~/.profile
nvm install v0.12.7
npn install bower -g
rake bower:install
In my case, our codebase used private Bower packages hosted on Gemfury. We enabled this by adding
"resolvers": [
"fury-bower-resolver"
]
to the repo's .bowerrc. This setting is only supported in Bower 1.7.x. My global bower binary was 1.7.2, so I had no problems running bower install, but the rake bower:install tasks doesn't use my global bower; it uses my_repo/node_modules/.bin/bower instead, and that one was version 1.4.2, which didn't understand the resolvers setting, hence the 'package not found' error. You can see which binary it's using in one of the first log output lines; then you can invoke that binary with -v to see which version it's on. The fix was to upgrade the Bower binary that bower-rails uses with npm upgrade bower (needless to say, don't add the -g option!)
Try deleting the vendor directory and re-running rake bower:install.
P.S. Before deleting please check what else is inside vendor directory besides bower_components - you may have to reinstall those as well.
I am trying to deploy my rails app with capistrano and I am getting the following error after the command:
cap production deploy
Output:
DEBUG[a3e9636c] Running /usr/bin/env [ -d ~/.rvm ] on handco-op.com
DEBUG[a3e9636c] Command: [ -d ~/.rvm ]
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host appname.com: Authentication failed for user deploy#appname.com
/home/deploy/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh.rb:219:in `start'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/connection_pool.rb:50:in `call'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/connection_pool.rb:50:in `create_new_entry'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/connection_pool.rb:22:in `checkout'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:179:in `with_ssh'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:131:in `block in _execute'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `tap'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `_execute'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:62:in `test'
/home/deploy/.rvm/gems/ruby-2.1.2/bundler/gems/rvm-dc35ec5e7a74/lib/capistrano/tasks/rvm.rake:19:in `block (3 levels) in <top (required)>'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `run'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Net::SSH::AuthenticationFailed: Authentication failed for user deploy#appname.com
/home/deploy/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh.rb:219:in `start'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/connection_pool.rb:50:in `call'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/connection_pool.rb:50:in `create_new_entry'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/connection_pool.rb:22:in `checkout'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:179:in `with_ssh'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:131:in `block in _execute'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `tap'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `_execute'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:62:in `test'
/home/deploy/.rvm/gems/ruby-2.1.2/bundler/gems/rvm-dc35ec5e7a74/lib/capistrano/tasks/rvm.rake:19:in `block (3 levels) in <top (required)>'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `run'
/home/deploy/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => rvm:hook
(See full trace by running task with --trace)
Just to be clear, I replaced my real server name with "appname" to stay secret;) Thanks for any advice! I hope it is a simple fix and I will keep looking into the error as well.
I was missing secret keys, had to set up nopassword ssh and a lot of other tweaks. It is a hard error to fix and takes a lot of things to get around. It was about three hours of debugging and fixing my permissions. Some tutorials setting this up actually can mess things up such as setting the users in the sudo group really makes it hard to define the user directly in: visudo I recommend not adding anything to the sudo group via:
sudo adduser user sudo
This was just my set up so you may need to add a user to sudo but I prefer giving ALL permissions to my users in visudo with:
visudo
user ALL = NOPASSWD:
Hope this someone get around this! it was a dang hard error to fix with a lot happening and was mostly my user errors when configuring capistrano. Good luck! Keep calm and code on!;)
I have a private Rails app that I'm trying to install locally. It's currently running in a hosting environment but I'd like to install it locally to begin making changes. I've already worked out that I can make deploy updates to the 'live' server but a recent misstep 'reinforced the need to make changes locally'.
After a fair amount of reading I determined that I needed to...
Grab the latest repository (It uses SVN)
Grab the database mysqldump -u root --databases my_db_development > my_db_development_0110.sql
Imported database locally (MAMP/Sequel Pro noticed there was no data in the database although there is data in the live server - is that strange?)
Validate database.yml (adapter: mysql, encoding: utf8, database: my_db_development, username: root, password: , host: localhost)
The next step I assumed was to get into my local directory and rake db:migrate --trace which returned the output below.
I'm a bit unsure how to go about understanding and identifying why I'm unable to move forward. Any ideas as to whether I've missed something or perhaps need to change something?
(in /Users/me/my_repo)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
Multiple migrations have the version number 1
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:472:in `migrations'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:15:in `inject'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:465:in `each'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:465:in `inject'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:465:in `migrations'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:431:in `migrate'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:373:in `up'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:356:in `migrate'
/Users/me/.gem/ruby/1.8/gems/rails-2.1.2/lib/tasks/databases.rake:99
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
It seems you have duplicate migrations in your migrate directory. Check the prefixes of the migrations under database_migrations/migrate and make sure you haven't copied multiple versions or created migrations out of sync with the repository.
If you are importing the entire database from your production environment, then you won't need to run db:migrate - the database/schema should already be up to date. It sounds like you are missing data in your local database and something went wrong with the import.