LinuxFr.org is a french web site speaking of Linux and Free Software.
This git repository is the rails application that run on LinuxFr.org.
The following instructions will help you to install the Rails part of LinuxFr.org on a Debian box.
-
First install the Debian packages:
(become root, you should probably remove any preexisting ruby1.8 installation)
-
Install some gems:
(could be gem1.9.1 instead of gem, installation should be in /var/lib/gems/1.9.1 by default)
-
Configure the database:
> CREATE DATABASE linuxfr_rails; > GRANT ALL PRIVILEGES ON linuxfr_rails.* TO "linuxfr_rails"@"localhost"; > QUIT; (return to user) -
Install and start redis:
$ wget "http://redis.googlecode.com/files/redis-2.2.1.tar.gz" $ tar xzf redis-2.2.1.tar.gz $ cd redis-2.2.1 $ make (optional, takes about ten minutes, $ make test ) $ src/redis-server redis.conf
-
Clone the repository, configure and install gems:
$ git clone git://github.com/nono/linuxfr.org.git $ cd linuxfr.org $ cp config/database.yml{.sample,} $ cp config/secret.yml{.sample,} (become root)
(probably /var/lib/gems/1.9.1/bin/bundle if not in your PATH) (return to user) $ rake db:setup (probably /var/lib/gems/1.9.1/bin/rake if not in your PATH)
-
Let's run it:
$ bundle exec rails server thin (probably /var/lib/gems/1.9.1/bin/bundle if not in your PATH) $ firefox http://127.0.0.1:3000/ (did you mean iceweasel?)
-
Create an admin account:
Create an account Get confirmation link in the console and confirm the account (Get password in the console) Give admin role to this account mysql> UPDATE accounts SET role='admin' WHERE login='xxxxxx'; Reload the page on the site, you should be admin.
If you want the full stack for running LinuxFr.org, you should also look at:
-
Be sure that redis is running and create the test database:
$ rake db:test:prepare
-
Run spork in background:
$ spork &
-
And now, just run rspec (and repeat this step until done):
$ rspec spec
The code is licensed as GNU AGPLv3. See the LICENSE file for the full license.
The default avatar is a modified Tux.
Iconic icons are licenced CC by-sa 3.0.
Copyright (c) 2011 Bruno Michel [email protected]