Open link in a new tab

Content

Expand project menu

Op3.0 Stable problem with login

Hello all

Last night I installed a fresh copy of OP3.0 on a fresh install of Debian 7 on a new VM following the instructions on site which worked perfect. Seeing the login page come up after install with no glitches. However, I cannot login. I have checked the database and there are no users. so eventhough I created a new user on my site, there is no way for me to login. It says I haven’t been activated yet. I cannot send out email either (Separate problem I am trying to resolve) so I do not get the activation email.

I tried setting the field “admin” in table “user” to 1 but it made no difference. Can anyone tell me how I can mark my user as admin and activated in DB so I can at least test other things whilst I resolve the email issue?

Best wishes

Nima

Message actions

Not sure what a “field” or “table” are (little Rails humor for you…)

Seriously though, did you run the migration yet? Sounds like a problem I had before but I could be wrong:

bundle exec rake db:create:all # Create db's
bundle exec rake db:migrate    # Set it all up etc.
RAILS_ENV="production" bundle exec rake db:migrate   # The same but for production database

If you’ve done all this and feel I’ve impugned your competence, I apologize. I just know it was an issue I had and the above solved it.

Info adapted from https://www.openproject.org/topics/684?board_id=9

Message actions

Hello Milton

Thank you for your comments and the Rail humour… LOL :). The problem is that the data has not migrated. I can see virtually all tables are empty. I have run the commands above again and the darn thing doesn’t get populated, eventhough it seems to be doing well when executing and not showing any error. I will do it again, but is there a log for this specific process that I can check afterwards and see if there is a meaningful error somewhere?

Best wishes

Nima

Message actions

Did you update the db settings in config/database.yml?

Also try

rake --dry-run

and

rake --trace

to get more verbosity.

Message actions

Hi Milton

Yes, the db config file is ok. The site comes up. I just dropped the db completely and went through the whole process again. Tell me something please. Shouldn’t there be a user called “admin” with password “admin” after installation? The only user in the “user” table is one called “Anonymous”.

I am at a loss. Maybe that is how it is supposed to be, in which case I need to prioritise the email problem so I can go through verification.

Any thoughts?

Best wishes

Nima

Message actions

Try

bundle exec rake db:seed

That work?

Message actions

yessssssssss. Is there a way I can come and hug and kiss you? This is what was missing from the instructions.

Thank you Milton :)

Now to go and solve email problem…

Best wishes

Nima

Message actions

Haha, glad to help. db:seed should have been my first thought since you said the db was active.

I’ll confess to not knowing as much about action mailer. Have you set it up in config/configuration.yml?

Message actions

I run
bundle exec rake db:seed
but i don’t sign with user: admin /pass: admin
Please helme :(

Message actions

Assuming everything is installed correctly (ruby, apache, mysql/postgres, bundle, gem, etc.), make sure you’ve run all these rake commands…

bundle exec rake db:create:all   # Make the actual DB
bundle exec rake db:migrate      # Setup fields tables etc.
bundle exec rake generate_secret_token      # Security thing to prevent cookie tampering etc.
RAILS_ENV="production" bundle exec rake db:migrate  # Set up the production migrations
bundle exec rake db:seed  # Seed the db with some preliminary stuff - sample project in development, login credentials etc.

…and let me know how it goes

Message actions

Hi,

Milton is almost right

bundle exec rake db:create:all
bundle exec rake generate_secret_token 
RAILS_ENV="production" bundle exec rake db:migrate
RAILS_ENV="production" bundle exec rake db:seed

Should do it.

Best
Ratzi

Message actions

Good call, thanks Christian. CLI environmental variables are easy to forget. I’m used to setting them in config files

Message actions

Thanks Chiristian
I’ve. Have some problem, i don’t known more Postgresql. How can I format user on Postgresql database

Message actions

Hi quyen dang

What do you mean by “formating user”? What exactly is your problem? Are you missing the sample data like I was at the begining of this thread?

Best wishes

Nima

Message actions

delete user or i want reset user/pass in database ( postgresql )
eg : i creat user “binarin” and then i want delete
Tks
Quyen Phal

Message actions

Hi Quyen

A simple “delete” SQL query would suffice, but why do you want to manage users (add or delete) directly through the DB? Why aren’t you using the “User” section of OP to add/delete users which does a much much simpler and cleaner job?

Best wishes

Nima

Message actions

Hi Nima
I don’t known more comand on Postgresql :((
Tks
Quyen Phal

Message actions

Yes, but why are you not using the built in user management section on OP? Why do you want to do anything directly on the database?

Message actions

What we’re saying, Quyen Phal, is that between Rails, Rake, and OpenProject, there’s no need to use Postgresql commands or muck around in the database.

Handling users should be done through the admin account, which is set up through the rake db:**** commands.

I don’t use MySQL or Postgres commands anymore, except for php projects. The purpose of Rails and OP is to abstract that away.

Message actions

Hi
I want Install Openproject on Centos with Mysql( not usde Postgresql ) . How to do it ?

Message actions

exactly
i want Centos 6.5(setup with Apache and MySQL)
quyen dang