On Jun 3, 1:56 am, Marius Mårnes Mathiesen
<[email protected]> wrote:
> On 3. juni. 2009, at 05.47, prlawrence wrote:
>
> > In the meantime, is there a way I can create teams from the command
> > line?  Some sort of rake command or somesuch?  That would at least get
> > me ready to demo the tool even if I didn't figure out the team
> > creation page problem yet.
>
> Sure!
> Rails comes with a console for working with your models. Fire it up  
> like so
>
>         RAILS_ENV=<your-env> ruby script/console
>
> This gives you an interactive Ruby shell with your Rails environment  
> loaded. From here you can:
>
>         me = User.find_by_login '<your_login>'            # substitute with 
> your login  
> on your installation of Gitorious
>         my_team = Group.new
>         my_team.name = 'footeam'                                # or whatever
>         my_team.description = 'Some wordy description here'
>         my_team.creator = me                                    # Every team 
> has a creator, in this case  
> this would be you
>         my_team.save!
>
> As you can see, you're working with your database, but through Active  
> Record (Rails' ORM). Although using a SQL shell is possible, using the  
> script/console is more comfortable and maintains the relationships the  
> way they're supposed to be.

OK, I followed this recipe, and the Teams page now shows my new team.
However, there are no members.

When I use the Add new member page, the dropdown box for Role is
empty.

When I click Save changes, I get the "We're sorry, but something went
wrong" page.

Perhaps there is something fundamentally wrong with my
installation.  :-(  Do I need a different cookie secret in prod, test
and dev?   Here's my gitorious.yml:
$ cat config/gitorious.yml
production:
  # The session secret key (`apg -m 64` is always useful for this
kinda stuff)
  cookie_secret: [cookie secret]

  # The path where git repositories are stored. The actual (bare)
repositories resides
  # in repository_base_path/#{project.slug}/#{repository.name}.git/:
  repository_base_path: "/home/git"

  # Stuff that's in the html <head>. custom stats javascript code etc
  extra_html_head_data:

  # System message that will appear on all pages if present
  system_message:

  # Port the ./script/gitorious script should use:
  gitorious_client_port: 80

  # Host the ./script/gitorious script should use:
  gitorious_client_host: localhost

  # Host which is serving the gitorious app, eg "gitorious.org"
  gitorious_host: gitorious.domain.com

  # User which is running git daemon
  gitorious_user: git

  # Email spam on server errors to:
  exception_notification_emails:

  # Mangle visible e-mail addresses (spam protection)
  mangle_email_addresses: true

  # Enable or Disable Public Mode (true) or Private Mode (false)
  public_mode: false

  # Define your locale
  locale: en

  # Where should we store generated tarballs?
  # (should be readable by webserver, since we tell it to send the
file using X-Sendfile)
  archive_cache_dir: "/path/to/tarballs-cache"
  # Which directory should we work in when we generate tarballs,
before moving
  # them to the above dir?
  archive_work_dir: "/path/to/tarballs-work"

  # is it only site admins who can create new projects?
  only_site_admins_can_create_projects: false

  # Should we hide HTTP clone urls?
  hide_http_clone_urls: false

development:
  # The session secret key (`apg -m 64` is always useful for this
kinda stuff)
  cookie_secret: [cookie secret]

  # The path where git repositories are stored. The actual (bare)
repositories resides
  # in repository_base_path/#{project.slug}/#{repository.name}.git/:
  repository_base_path: "/home/git"

  # Stuff that's in the html <head>. custom stats javascript code etc
  extra_html_head_data:

  # System message that will appear on all pages if present
  system_message:

  # Port the ./script/gitorious script should use:
  gitorious_client_port: 80

  # Host the ./script/gitorious script should use:
  gitorious_client_host: localhost

  # Host which is serving the gitorious app, eg "gitorious.org"
  gitorious_host: gitorious.domain.com

  # User which is running git daemon
  gitorious_user: git

  # Email spam on server errors to:
  exception_notification_emails:

  # Mangle visible e-mail addresses (spam protection)
  mangle_email_addresses: true

  # Enable or Disable Public Mode (true) or Private Mode (false)
  public_mode: false

  # Define your locale
  locale: en

  # Where should we store generated tarballs?
  # (should be readable by webserver, since we tell it to send the
file using X-Sendfile)
  archive_cache_dir: "/path/to/tarballs-cache"
  # Which directory should we work in when we generate tarballs,
before moving
  # them to the above dir?
  archive_work_dir: "/path/to/tarballs-work"

  # is it only site admins who can create new projects?
  only_site_admins_can_create_projects: false

  # Should we hide HTTP clone urls?
  hide_http_clone_urls: false

test:
  # The session secret key (`apg -m 64` is always useful for this
kinda stuff)
  cookie_secret: [cookie secret]

  # The path where git repositories are stored. The actual (bare)
repositories resides
  # in repository_base_path/#{project.slug}/#{repository.name}.git/:
  repository_base_path: "/home/git"

  # Stuff that's in the html <head>. custom stats javascript code etc
  extra_html_head_data:

  # System message that will appear on all pages if present
  system_message:

  # Port the ./script/gitorious script should use:
  gitorious_client_port: 80

  # Host the ./script/gitorious script should use:
  gitorious_client_host: localhost

  # Host which is serving the gitorious app, eg "gitorious.org"
  gitorious_host: gitorious.domain.com

  # User which is running git daemon
  gitorious_user: git

  # Email spam on server errors to:
  exception_notification_emails:

  # Mangle visible e-mail addresses (spam protection)
  mangle_email_addresses: true

  # Enable or Disable Public Mode (true) or Private Mode (false)
  public_mode: false

  # Define your locale
  locale: en

  # Where should we store generated tarballs?
  # (should be readable by webserver, since we tell it to send the
file using X-Sendfile)
  archive_cache_dir: "/path/to/tarballs-cache"
  # Which directory should we work in when we generate tarballs,
before moving
  # them to the above dir?
  archive_work_dir: "/path/to/tarballs-work"

  # is it only site admins who can create new projects?
  only_site_admins_can_create_projects: false

  # Should we hide HTTP clone urls?
  hide_http_clone_urls: false

Here's my database.yml:
$ cat config/database.yml
# MySQL (default setup).  Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
#   gem install mysql
# On MacOS X:
#   gem install mysql -- --include=/usr/local/lib
# On Windows:
#   gem install mysql
#       Choose the win32 build.
#       Install MySQL and put its /bin directory on your path.
#
# And be sure to use new-style password hashing:
#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
  adapter: mysql
  database: gitorious_development
  username: root
  password: secret_password
  host: localhost
  encoding: utf8

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
  adapter: mysql
  database: gitorious_test
  username: root
  password: secret_password
  host: localhost
  encoding: utf8

production:
  adapter: mysql
  database: gitorious_production
  username: root
  password: secret_password
  host: localhost
  encoding: utf8

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gitorious?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to