Project

General

Profile

Need help with redmine installing

Added by Xottabych UA over 14 years ago

I have a trouble with this step
5. Create the database structure, by running the following command under the application root directory:

rake db:migrate RAILS_ENV="production"

Env:
Linux vbox 2.6.18-128.1.10.el5.centos.plusxen #1 SMP Mon May 11 08:06:40 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
redmine 0.8.4
rake-0.8.7

[root@vbox rake-0.8.7]# rake db:migrate RAILS_ENV="production"
(in /home/mooz/redmine/rake/rake-0.8.7)
rake aborted!
Don't know how to build task 'db:migrate'

(See full trace by running task with --trace)

and rake -T does not show such task. Can anybody tell me how to resolve this?


Replies (11)

RE: Need help with redmine installing - Added by Adrian Cherry over 14 years ago

Hi,
The first check is are you running rake in your redmine installation directory and not the rake installation directory?

What is your output from rake -T ?

Adrian

RE: Need help with redmine installing - Added by Xottabych UA over 14 years ago

Thank you, it was my mistake )

After cd the system wants 'gem install -v=2.1.2 rails'
and rake -T showing 'rake db:migrate' !!

May be it will be useful for somebody:
On my Centos (and as I googled - on Ubuntu too) the next step end with error:

[root@vbox 0.8.4]# rake db:migrate RAILS_ENV="production"
(in /home/mooz/redmine/0.8.4)
rake aborted!
No such file or directory - /tmp/mysql.sock

(See full trace by running task with --trace)

It is because redmine searching for that file in /tmp/mysql.sock by default
You must find a real placement of mysql.sock by using 'find' command or look at your mysqld start parametres:
[root@vbox 0.8.4]# ps ax|grep mysql
23742 pts/1 S+ 0:00 grep mysql
32666 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid

and then create a link
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

After that run rake db:migrate RAILS_ENV="production"

RE: Need help with redmine installing - Added by Xottabych UA over 14 years ago

And one more problem.
This time with e-mail sending
I have a Postfix installation on localhost, which works correctly and send e-mails. Connections limited from localhost only and authentication is not required.
But Redmine cannot send a test e-mail from administrator interface -error message is :
An error occurred while sending mail (both user and secret are required)

cat config/email.yml
  1. Outgoing email settings

production:
delivery_method: :smtp
smtp_settings:
address: localhost
port: 25
domain: mydomain.com
authentication: :none
user_name:

Have you any idea?

And one more question: how I can correctly restart redmine? ps ax + kill -9 - it is not seems a right way... )))

RE: Need help with redmine installing - Added by Aditya Tuli over 14 years ago

I've hit the same problem :( After the following step:

rake db:migrate RAILS_ENV="production"

I get the rake aborted message.

The versions I am running are as follows:
ruby: 1.8.6
rails: 2.1.2
gem: 1.3.1
rake: 0.8.3

This is on Ubuntu 8.04 LTS. Can someone help please?

Thanks,

RE: Need help with redmine installing - Added by Xottabych UA over 14 years ago

More info needed...
give 'pwd' and 'rake db:migrate RAILS_ENV="production" ' output

RE: Need help with redmine installing - Added by Aditya Tuli over 14 years ago

Hi,

I am using MYSQL (5.0.5). The settings in database.yml read as follows:

production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: *
encoding: utf8

The output on running rake db:migrate RAILS_ENV="production" --trace is as below:


user user:~/redmine$ sudo rake db:migrate RAILS_ENV="production" --trace
[sudo] password for user:
(in /home/user/redmine)
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
    rake aborted!
    no such file to load -- redmine
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /home/user/redmine/config/initializers/30-redmine.rb:7
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:503:in `load'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:503:in `load'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:503:in `load'
    /home/user/redmine/vendor/rails/railties/lib/initializer.rb:484:in `load_application_initializers'
    /home/user/redmine/vendor/rails/railties/lib/initializer.rb:483:in `each'
    /home/user/redmine/vendor/rails/railties/lib/initializer.rb:483:in `load_application_initializers'
    /home/user/redmine/vendor/rails/railties/lib/initializer.rb:149:in `process'
    /home/user/redmine/vendor/rails/railties/lib/initializer.rb:97:in `send'
    /home/user/redmine/vendor/rails/railties/lib/initializer.rb:97:in `run'
    /home/user/redmine/config/environment.rb:20
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
    /home/user/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /home/user/redmine/vendor/rails/railties/lib/tasks/misc.rake:3
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
    /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
    /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
    /usr/local/bin/rake:19:in `load'
    /usr/local/bin/rake:19

Please help. Thanks.

RE: Need help with redmine installing - Added by Xottabych UA over 14 years ago

try 'rake -T'in redmine directory - does it show db:migrate task in a list?
and give 'ls -laF' in redmine directory.

RE: Need help with redmine installing - Added by Aditya Tuli over 14 years ago

Yes, it shows db:migrate in list of rake tasks (along with many other migrate tasks like :all, :down:, :plugins etc.)

Here is the output of the ls -laF:


user user:~/redmine$ ls laF
total 48
drwxr-xr-x 11 user user 4096 2009-09-20 16:57 ./
drwxr-xr-x 45 user user 4096 2009-09-22 15:08 ../
drwxr-xr-x 4 user user 4096 2009-09-20 16:57 config/
drwxr-xr-x 2 user user 4096 2009-09-20 16:57 doc/
drwxr-xr-x 2 user user 4096 2009-09-20 16:57 files/
drwxr-xr-x 2 user user 4096 2009-09-20 16:57 lang/
drwxr-xr-x 2 user user 4096 2009-09-20 17:17 log/
drwxr-xr-x 7 user user 4096 2009-09-20 16:57 public/
-rw-r--r-
1 user user 307 2009-09-20 16:57 Rakefile
drwxr-xr-x 3 user user 4096 2009-09-20 16:57 test/
drwxr-xr-x 5 user user 4096 2009-09-20 16:57 tmp/
drwxr-xr-x 4 user user 4096 2009-09-20 16:57 vendor/


Thanks.

RE: Need help with redmine installing - Added by Xottabych UA over 14 years ago

It is may be wrong with your rails version. redmine installation guide says : "gem install rails -v-2.2.2", but you have 2.1.2 instead. No other reason to fail, i think...

RE: Need help with redmine installing - Added by Aditya Tuli over 14 years ago

Thanks. It seems I may have solved my problem.

I was using redmine v0.8.5. I have now moved to v0.8.4.I also moved to rails v2.2.2 as you suggested. I suspect though that this was not required - the problem has something to do with the redmine version.

With 0.8.4 I had the problem with /tmp/mysql.sock just like above. I resolved this by creating a symbolic link as suggested. Think redmine 0.8.5 is not really stable as suggested by the Downloads page.

Thanks for your help!

RE: Need help with redmine installing - Added by Eric Davis over 14 years ago

Aditya Tuli wrote:

user user:~/redmine$ ls -laF

It looks like you were missing quite a few directories, including lib/ and app/ which has most of Redmine's source code and would cause the "no such file to load -- redmine" error. Downloading the package should have fixed it.

Eric Davis

    (1-11/11)