You are on page 1of 51

Cicolink Blog

AUG
APR

18
19

Web technologies, rich internet application

search

How
with
SQLite3
How to
to install
install Ruby
Ruby on
on Rails
Rails 43.2
with
MySQLononDebian/Ubuntu
Debian/Ubuntu
This is the way I managed to install Ruby on Rails 4 with SQLite3 on Debian Wheezy / Ubuntu 12.04
This is the way I managed to install Ruby on rails 3.2 with MySQL on Debian/Ubuntu.
(but it is valid also for previous versions of Ubuntu 11.04, 10.10, 10,04 etc) . I've chosen to install all
the packages manually in a way that you can exactly know what you're installing and where, without
Other articles you may be interested in:
using rbenv or RVM.
ROR with SQLite3 for Ubuntu 11 .10 (the easiest way to install and use ror)
ROR with SQLite3 for Fedora 15
Pay attention: if you had already installed Ruby on rails with SQLite3 and you just want to add mysql
Other articles you may be interested in:
database you can skip some steps, but make sure to install the required libraries.
ROR with MySQL for Ubuntu
1. INSTALL THE NEEDED LIBRARIES
Type the following command in the console:
1. INSTALL SOME LIBRARIES
sudo apt-get install zlib1g zlib1g-dev build-essential openssl libssl-dev libmysqlclient18
Open the console and run the following comand as super user (su -):
libmysqlclient-dev libyaml-dev
apt-get install zlib1g zlib1g-dev build-essential sqlite3 libsqlite3-dev openssl libssl-dev libyaml2. DOWNLOAD AND INSTALL RUBY 1.9.3
dev libreadline-dev libxml2-dev libxslt1-dev

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

Send feedback

pdfcrowd.com

Send feedback

2. DOWNLOAD AND INSTALL RUBY 1.9.3


Download the last version Ruby 2.0.0 in the "Compiling Ruby" section of the web page
Unzip the archive
Install running:
$ ./configure
$ make
$ sudo make install
Check the successful installation running ruby -v: it should answer with "ruby 2.0.0pxxx..."
And gem -v should answer "2.0.3" or next...
3. INSTALL RAILS
Install Rails running on the console as super user: $ gem install rails
(it takes a while, don't worry)
Check if everything's ok using the commands "rails -v" (you should get "Rails 4.0.0") or "gem list"
4. CREATE A NEW RAILS PROJECT
$ rails new yourappname
Hold on after the message run bundle install
5. CREATE THE BLANK DATABASE
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Put the console in myapp folder (cd yourappname) and run: $ rake db:create
in order to create the databases test.sqlite3 and development.sqlite3: (you can see them in db
folder).
!!! If you receive some error jump to the session : 9. !! COMMON ISSUES THAT MIGHT OCCUR !!!
6. RUN YOUR RAILS APP
Put the console in myapp folder and run $ rails server
Open the browser
http://localhost:3000
and you should see the Ruby on Rails: welcome page;-)

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

I suggest you to continue the ROR learning on the official documentation, in particular on the getting
started page.

9. !! COMMON ISSUES THAT MIGHT OCCUR !!


Running rails server you could get the following error:
/usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -sqlite3/sqlite3_native (LoadError)
Solution (thanks to: http://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3native-loaderror-on-ruby-on-rails ):
find out the location of the file sqlite3-1.3.7.gemspec (locate sqlite3-1.3.7.gemspec), mine is
" /usr/local/lib/ruby/gems/2.0.0/specifications/sqlite3-1.3.7.gemspec"
modify that line s.require_paths = ["lib"] with s.require_paths = ["lib/sqlite3_native"]

Running rake db:create or rake db:migrate you could get the error: uninitialized constant
Rake::DSL. The solution is to put in the first line of your Rakefile: require 'rake/dsl_definition'
In the browser at localhost:3000 you could get the error: "no such file to load -- openssl".
The solution is to go through the installation directory of ruby: ruby-1.9.2-p180/ext/openssl and
run:
ruby extconf.rb
make
sudo make install
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Running rake db:create the first time could generate this error:
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of
available runtimes.
The error should be fixed adding in the Gemfile (in the root folder of your app) the lines:
gem 'execjs'
gem 'therubyracer'
and run the comand bundle install (as super user)
Put again the console in myapp folder and run: $ rake db:create
I hope that everything went the right way, check the comments below, feel free to post comments or
issues, please provide me a feedback ;-) AND DON'T FORGET TO +1 !

Posted 4 weeks ago by Manuele Dones


Labels: Ruby on rails, debian, Sqlite3, Ubuntu

APR

19

How to install Ruby on Rails 3.2 with MySQL on Debian/Ubuntu


This is the way I managed to install Ruby on rails 3.2 with MySQL on Debian/Ubuntu.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Other articles you may be interested in:


ROR with SQLite3 for Ubuntu 11 .10 (the easiest way to install and use ror)
ROR with SQLite3 for Fedora 15
Pay attention: if you had already installed Ruby on rails with SQLite3 and you just want to add mysql
database you can skip some steps, but make sure to install the required libraries.

1. INSTALL THE NEEDED LIBRARIES


Type the following command in the console:
sudo apt-get install zlib1g zlib1g-dev build-essential openssl libssl-dev libmysqlclient18
libmysqlclient-dev libyaml-dev
2. DOWNLOAD AND INSTALL RUBY 1.9.3
Download the last version Ruby 1.9.3 in the "Compiling Ruby" section of the web page
Unzip the archive
Install running:
$ ./configure
$ make
take a coffee
$ sudo make install
Check the successful installation running ruby -v: it should answer with "ruby 1.9.3p..."

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

3. DOWNLOAD RUBY GEM: THE STANDARD RUBY PACKAGE MANAGER


Download ruby gem version 1.8.25 (rubygems-1.8.25.tgz)
Unzip the archive somewhere
Put the console in the unzipped folder
Install running: $ sudo ruby setup.rb
Check the successful installation running gem -v: it should reply "1.8.25"
4. INSTALL RAILS
Install Rails running on the console: $ sudo gem install rails
(it takes a while, don't worry)
Check if everything is ok using the commands "rails -v" (you should get "rails 3.2.XX") or "gem list"
5. INSTALL MYSQL
Install running on the console: $ sudo apt-get install mysql-client-5.5 mysql-server-5.5
During the installer it asks for a mysql root-user password (type for ex. admin)
Try to start and stop the mysql server using the commands:
$ sudo service mysql stop
$ sudo service mysql start

6. INSTALL MYSQL GEM


In order to install the mysql gem you could use:
$ sudo gem install mysql2
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

$ sudo gem install therubyracer


7. CREATE A NEW RAILS PROJECT
$ rails new yourappname -d=mysql
When you see run bundle install wait some seconds.
Put the console in myapp folder
It could be useful also to run:
$ sudo bundle install
because maybe the project requires other gems (in my case it installed a new version of rake
gem)

8. DATABASE SETTINGS ON THE NEW RAILS APPLICATION


Open the file myapp/config/database.yml and put your mysql root-user password for
the test and development database
You must leave a blank character after the 'password' keybord. So you should get something like
this:
adapter: mysql2
encoding: utf8
reconnect: false
database: myapp_development
pool: 5
username: root
password: your-password
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

socket: /var/run/mysqld/mysqld.sock
9. CREATE THE BLANK DATABASE
Start the mysql database using: sudo service mysql start
Put the console in myapp folder and run: $ rake db:create
Check the step 12 if you get an error here.
in order to create the databases myapp_test and myapp_development.
If creates the db is correctly creates, it replies with anything...
It could be useful to check if the db is created or not: do like this:
$ mysql -u root -p // open mysql console
$ Enter password: type-your-password
mysql> show databases;

and you should find the myapp_test and myapp_development db.


mysql> \q // close mysql console

10. RUN YOUR RAILS APP


Put the console in myapp folder and run $ rails server
Open the browser
http://localhost:3000
and you should see the Ruby on Rails: welcome page;-)
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

I suggest you to continue the ROR learning on the official documentation, in particular on the getting
started page.

11. SOME USEFUL MYSQL COMMANDS


$ mysql -u root -p
mysql> show databases;
open in browser PRO version

// open mysql console


//show all the databases

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

mysql> use database-name; //select a database


mysql> show tables;
//show the tables of the selected db
mysql> describe table-name; //show the attributes of the selected table
If you need to change the mysql root password type this command:
$ mysqladmin -u root -p password enter-your-new-password
Enter password: enter-your-old-password

12. !! COMMON ISSUES THAT MIGHT OCCUR !!


Running rake db:create or rake db:migrate you could get the error: Could not find a JavaScript
runtime.
put in the first line of your Rakefile: gem 'therubyracer'
run sudo bundle install
Running rake db:create or rake db:migrate you could get the error: uninitialized constant
Rake::DSL. The solution is to put in the first line of your Rakefile: require 'rake/dsl_definition'

In the browser at localhost:3000 you could get the error: "no such file to load -- openssl".
The solution is to go through the installation directory of ruby: ruby-1.9.2-p180/ext/openssl and
run:
ruby extconf.rb
make
sudo make install

I hope that everything went the right way, check the comments below, feel free to post comments or
issues, please provide me a feedback ;-) AND DON'T FORGET TO +1' !
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Posted 19th April by Manuele Dones


Labels: ruby on rails mysql ubuntu 11.10

How to compile and install TORCS on Linux.

OCT

11

Here's how I compiled and installed TORCS on a linux os (Debian in my case), using a 64bit processor.
Install the required libraries
sudo apt-get install build-essential libxmu-dev libxmu6 libxi-dev libxine-dev libalut-dev freeglut3
freeglut3-dev cmake libogg-dev libvorbis-dev libxxf86dga-dev libxxf86vm-dev libxrender-dev libxrandrdev zlib1g-dev libpng12-dev
PLIB 1.8.5
download PLIB 1.8.5 from here
configure the package with the following parameters(only for 64 bit cpu)
./configure CFLAGS="-O2 -m64 -fPIC" CPPFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC"
LDFLAGS="-L/usr/lib64"
sudo make install

OpenALsoft 1.13
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

download openal-1.13 from here


cd cmake
cmake .. (cmake[SPACE]DOTDOT)
sudo make
sudo make install
FreeALUT
Download freealut from here
configure, sudo make, sudo make install
TORCS
$ cd torcs-1.3.3
configure with the following parameters (only for 64 bit cpu)
./configure CFLAGS="-O2 -m64 -fPIC" CPPFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC"
LDFLAGS="-L/usr/lib64"
$ make
$ sudo make install
$ sudo make datainstall

RUN TORCS
just type "torcs" in the console.
If the music/sound don't work, try with typing "padsp torcs" in the console.
Posted 11th October 2012 by Manuele Dones
Labels: debian, Linux, 64bit, source, 64, torcs, compile

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

How to compile Speed Dreams 2 on Linux

OCT

11

Here is the way i managed to compile and install Speed Dreams on a Linux OS (Debian in my case)
Download the latest version of Speed Dreams from the official sourceforge Speed Dreams project.
Have a look here for the pre-requisites:
Working OpenGL Driver and header files / associated libraries
SDL 1.2
PLIB 1.8.3 / 4 / 5
OpenAL soft 1.5
ALUT 1.1
libpng
zlib
jpeg
ENet 1.2
X RandR
Install the required libraries:
sudo apt-get install build-essential libxmu-dev libxmu6 libxi-dev libxine-dev libalut-dev freeglut3
freeglut3-dev cmake libogg-dev libvorbis-dev libxxf86dga-dev libxxf86vm-dev libxrender-dev libxrandrdev zlib1g-dev libpng12-dev libsdl1.2-dev libenet-dev
PLIB 1.8.5:
download from here the latest version.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Put the unzipped folder in /usr/src.


If you have a 64 bit machine run these commands:
# export CFLAGS="-fPIC"
# export CPPFLAGS=$CFLAGS
# export CXXFLAGS=$CFLAGS
Install as usual:
./configure
make
sudo make install
OpenAL: download the source from here
unzip the folder
go into the build/directory, and run: cmake ..
ALUT: download the source from here
compile and run as usual
ENET
download from here
./configure
make
sudo make install

Speed Dreams:
create a folder
Download the following source files from here
speed-dreams-src-base-<version>.tar.xz
speed-dreams-src-hq-cars-and-tracks-<version>.tar.xz
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

speed-dreams-src-more-hq-cars-and-tracks-<version>.tar.xz
speed-dreams-src-wip-cars-and-tracks-<version>.tar.xz
speed-dreams-src-unmaintained-<version>.tar.xz
put the files in a folder
uncompress them with: for

file in *.xz; do tar xvfa $file; done

mkdir build
cd build
cmake -D OPTION_OFFICIAL_ONLY:BOOL=ON ..
make
sudo make install

You should find the game in /usr/local/games/speed-dreams-2


That's all!! Feel free to post comments, please provide me a feedback ;-) AND DON'T FORGET TO
+1' !
Posted 11th October 2012 by Manuele Dones
Labels: zlib, openal, plib, alut, Speed Dreams, compile, How to install speed dreams, 11.10, Ubuntu

SEP

15

How to install Unreal Tournament 2004 by Midway on Linux


Hi all, there are a lot of versions of Unreal Tournament 2004, as you can see from here.
Some versions have the linux-installer.sh included in the box, others not.
There are a lot of posts in forums talking about how to install a specific version of UT2004 on a linux

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

system, but none of them seems to work for me.


My version of UT2004 is this one: by Midway: http://www.amazon.com/Unreal-Tournament-2004pc/dp/B000IMNK0C/ref=cm_cr_pr_pb_t , with Editor's Choice included.
This is the content of my DVD:

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

This is the recipe:


1) Through this torrent download the linux installer. The first one: ut2004_3369-english.midway.dvd-3.run
2) Open the console and run: chmod +x ./ut2004_3369-english-midway.dvd-3.run
3) Then

./ut2004_3369-english-midway.dvd-3.run

4) The wizard starts.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

5) After entering the CD-KEY (I own an original copy) and clicking on Continue, the wizard will start
extracting files from the DVD.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

On first it seems to be freezed, but after some minutes the installer will start copying the
files.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

If you're sure that the installation process is stuck, I've found an alternative way: keep
reading
6) Come back to the console and type on your keyboard
wizard!

CTRL-X and ENTER in order to kill the

7) Force Quit the wizard and a new window should appear! Sometimes the new window appear only if I
close the console... Don't ask me why...

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

8) A new installation process begins, and this time it doesn't crash!

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

9) It will ask to mount the dvd...Just put the dvd in your player and complete the installation!
10) Personal Note: I need to run the game with padsp ./ut2004 in order to listen the music/sounds.
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

I hope this tutorial has helped you. If you found it useful don't forget to +1! Comments are
greatly appreciated!
Posted 15th September 2012 by Manuele Dones
Labels: how to install ut2004, midway, UT2004, Linux, editor's choice, Unreal Tournament 2004, Ubuntu

SEP

Unreal Tournament 2004: create a bot with Pogamut on Linux


This is a tutorial on how to create a bot for Unreal Tournament 2004 using Pogamut on a Linux system.
Since Pogamut is mainly supported for Windows, I hope this tutorial could help who is working on a linux
system.
I'm on Ubuntu 12.04, 64 bit machine. I cannot test if this tutorial is valid for different versions of Ubuntu,
the same for a 32 bit machine.
So first of all, what are the requirements in order to build a bot for UT2004:
Unreal Tournament 2004
GameBots2004 interface: it's a mod for UT2004 that allows bots in UT to be controlled by a
separate program by sending commands and receiving information via sockets.
The bot could be written in any languages and using any IDE, but the best way seems to use
Pogamut 3 because it includes GameBots2004, as well as an IDE integrated with NetBeans
So what we need:

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

JDK
Unreal Tournament 2004, the game
NetBeans
Pogamut 3.3.0

1) Install UT2004-THE GAME


This was the hardest part in my case, since I have the UT2004 by MIDWAY, DVD version, with Editor's
Choice included, without the linux-installer.sh.
If this is your case, I wrote my recipe. Otherwise you should search online some way for installing the
game, depending on the version you own.

2) Install JDK
There are several ways to install a JDK: my suggestion is to download the JDK from the official website.
Unzip it somewhere.
FOR A UBUNTU SYSTEM:
Update the file /etc/environment like this:
PATH="/usr/loc....[etc]:/home/manuele/software/jdk1.7.0_03/bin"
JAVA_HOME="/home/manuele/software/jdk1.7.0_03"
where /home/manuele/software/jdk1.7.0_03 is the unzipped jdk folder.
Save the file.
Reboot the system.
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

FOR A DEBIAN SYSTEM


Move the unzipped JDK folder into /usr/lib/jvm:

sudo mv ./jdk1.7.0_07 /usr/lib/jvm/jdk1.7.0_07


sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_07/bin/java" 1

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_07/bin/javac" 1


sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_07/bin/javaws" 1
sudo update-alternatives --config javasudo update-alternatives --config javac

sudo update-alternatives --config javaws

3) Install NetBeans
Download it from the official website. I downloaded the last version (7.2) , version called "ALL".
Install it, typing on your Linux console:
chmod +x netbeans-7.2-ml-linux.sh
./netbeans-7.2-ml-linux.sh

4) Install Pogamut
Download it from the official website. Download the standalone version: it's a java file, so in order to
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

install it, you should type on the Linux console:


java -jar PogamutUT2004Installer-3.3.0-standard
The installation wizard should start.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

During the installation of Pogamut you should deselect the "UT2004Patch" if you get some kind of
errors...

When it asks for the netbeans folder, you should choose the netbeans-7./nb folder.
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

At the end you will get this error, but it should not be a big trouble...

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

I'm noticing that Pogamut didn't create any Maven folder... Anyway, Netbeans has a bundled version of
Maven, but you could download the latest version from the website... Remember to update the Maven
directory into NetBeans...

5) Create the first (Empty)Bot.


Open NetBeans by super user --> New project --> Choose Project: Maven and Projects: Project
from Archetype

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

--> NEXT --> fill the form as follows:


groupId = cz.cuni.amis.pogamut.ut2004.examples
artifactId = 00-empty-bot-archetype
version = 3.3.1-SNAPSHOT
repository = http://diana.ms.mff.cuni.cz:8081/artifactory/repo

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

NEXT...

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

And you should see your project into NetBeans Projects lists.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Note: if the IMPORT packages in the java class seem to be broken, just RIGHT-CLICK on the
project -> "Build with Dependences" should resolve it (it takes some time...)
You can download other artifacts from :
the official archetype catalog
the official snapshot catalog (scroll down until <!-- POGAMUT 3.3.1 --> )

You can also find some Maven project examples into Pogamut/archetypes/ut2004 folder ....
:)

6) Start Unreal Tournament Server


Put the console in the folder you installed UT2004/System (there should be ucc-bin,and/or ucc-binlinux-amd64 files..)
Make ucc-bin or ucc-bin-linux-amd64 runnable:
chmod +x ./ucc-bin
or
chmod +x ./ucc-bin-linux-amd64
and finally start the server using this sintax:
sudo ./ucc-bin server DM-TrainingDay?game=GameBots2004.BotDeathMatch?timelimit=999999

or
sudo ./ucc-bin server CTF-1on1-Joust?game=GameBots2004.BotCTFGame?timelimit=999999
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

If it asks for a server-key, you could get one here, and then type on the console in the System
directory:
echo "SRVER-xxxxx-xxxxx-xxxxx" > ./cdkey
where SRVER-xxxxx-xxxxx-xxxxx is your key code.
I got this:
Executing Class Engine.ServerCommandlet
Browse:

CTF-1on1-Joust?Name=Manu?Class=Engine.Pawn?Character=Jakob?team=255?game=GameBots2004.BotCTFGame?

timelimit=999999
Collecting garbage
Purging garbage
Garbage: objects: 33550->33546; refs: 386745
Game class is 'BotCTFGame'
Bringing Level CTF-1on1-Joust.myLevel up for play (20) appSeconds: 19.849080...
GameInfo::InitGame : bEnableStatLogging False
UdpServerQuery(crt): Port 7787 successfully bound.
Resolving master0.gamespy.com...
MasterServerUplink: MasterServerGameStats not found - stats uploading disabled.
Defaulting to false
Defaulting to false
Resolving ut2004master2.epicgames.com...
Webserver is not enabled. Set bEnabled to True in Advanced Options.
GB server on.

BotServerPort:3000 ControlServerPort:3001 ObservingServerPort:3002


START MATCH

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

MasterServerUplink: Resolved ut2004master2.epicgames.com as 199.255.40.171.


Resolved master0.gamespy.com (69.10.30.248)
UdpGameSpyUplink: Master Server is master0.gamespy.com:27900
UdpGameSpyUplink: Port 7788 successfully bound.
MasterServerUplink: Connection to ut2004master2.epicgames.com established.
Approval APPROVED
Master server requests heartbeat 0 with code 3264
Master server requests heartbeat 1 with code 3264
Master server requests heartbeat 2 with code 3264
Master server assigned our MatchID: 0

Here is a list of some useful websites about UT2004 server settings:


Pogamut/gamebots
www.dragonbe.be
wiki.unrealadmin.org
www.r3uk.com

7) Connect NetBeans to the UT2004 Server


NetBeans --> Services Tab --> right-click on UT2004Servers --> addServer:
Fill the form as follows:
Server name: (as you want, like..): UTlocal
URI: localhost:<ControlServerPort>
Map: it automatically selects the map you've chosen when you started the server, but you can change
it if you want...
where <ControlServerPort> could be 3001, 3002, 3003, etc
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

localhost:3001
localhost:3002

You should have something like this:

From the Pogamut tutorial you can read: "You can start the bot by pressing F6 ( Run Main Project ).
If everything works fine, the bot will connect to the server and begin execution. After starting, the bot will
appear under the Local UT node in Pogamut bots folder. It will be represented by a node
named EmptyBot. If you select the bot's node, you will see some additional information about the bot
in Properties window (Window Properties). Agent3D section shows properties defining bot's
position in the space, Agent configuration section enables you to change bot's behavior/abilities (e.g.
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

if the bot will be able to use raycasting, if it will automatically pick up items etc.). You will see that the
bot is standing still, no movement, no rotation, after all, that's what it was designed for.
Start the UT directly from Netbeans
Right click Local UT server node and select Spectate action, the UT2004 will start in the spectate
mode and it will be automatically connected to the selected server.

8)Run the (Empty)Bot


Right-click on the NetBeans project --> Run.
The spectate function doesn't work in my case...

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

9)Start UT2004
Open UT2004-the game --> Join Game --> LAN tab --> UT2004 Server --> double Click on it.
Or better, just run the game typing in your Linux console:
./ut2004 127.0.0.1

and you will find your empty bot!


open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

I hope that everything went the right way, check the comments below, feel free to post comments or
issues, please provide me a feedback ;-) AND DON'T FORGET TO +1' !
Posted 9th September 2012 by Manuele Dones
Labels: GameBots2004, UT2004, Linux, bot, Maven, netBeans, Unreal Tournament 2004, Ubuntu

DEC

How to install Ruby on Rails 3.1 with SQLite3 on Fedora 15

22
This is the way I managed to install Ruby on rails 3.1 with SQLite3 on Fedora 15.
1) Install the required libraries (if they're already not installed yet)

su -c 'yum install gcc zlib-devel sqlite-devel openssl-devel'


2) Download and install Ruby 1.9.3 in the "Compiling Ruby" section of the web page
unzip and install with:
./configure
make
su -c 'make install'
check the successful installation running ruby -v: it should answer with "ruby 1.9.3p0..."
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

3) Download ruby gem version 1.8.15 (rubygems-1.8.15.tgz)


unzip and run
su -c 'ruby setup.rb'

check the successful installation running gem -v: it should reply "1.8.15"
4) Install rails running su -c 'gem install rails' (it takes a while, don't worry)
check if everything's ok using the commands "rails -v" (you should get "rails 3.1.0") or "gem list"

5) Install the sqlite3 gem running: su -c 'gem install sqlite3'

6) create a new rails project with "rails new myapp"


7) Put the console in myapp main folder and run: "rake db:create" in order to create the databases
test.sqlite3 and development.sqlite3 (you can see them in db folder).
8) Turn on the rail server: "rails server"
Open the browser -> http://localhost:3000
9) If you get the error: "no such file to load -- openssl" into the browser go through the directory: ruby1.9.2-p180/ext/openssl and run:
ruby extconf.rb
make
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

sudo make install


I hope that everything went the right way, feel free to post comments or issues.
DON'T FORGET TO +1 !
Posted 22nd December 2011 by Manuele Dones
Labels: ruby on rails sqlite fedora 15

DEC

22

How to install Ruby on Rails 3.1 with Sqlite3 or MySQL on Windows


This is the way I managed to install Ruby on rails 3 with MySQL on Windows 7 32 bit (someone should
try on a 64 bit system...)
Other articles you may be interested in:
ROR with SQLite3 for Ubuntu 11 .10 (the easiest way to install and use ror)
ROR with SQLite3 for Fedora 15
Install Ruby, the programming language. Download from the official Rubyforge web
site or from the official rubyinstaller web page the file rubyinstaller-1.9.3-p0.exe. Click on
the installer and follow the wizard: select Add Ruby executables to your PATH and Associate
.rb and .rbw files with this Ruby installation.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Open the console: START --> type cmd into the search-input-box

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Check the successful installation of Ruby running ruby -v into the console. If you type gem -v it
will answer with 1.5.2. Since this version is a bit old you may prefer to install the newest one (if you
want to keep the 1.5.2 version you should skip the next 3 steps)

1. (optional) Install Ruby GEM. Download from ruby gem official web page the file rubygems1.8.12.zip, and unzip it somewhere on your computer, i suggest you on the Desktop.
2. (optional). Type the path at your unzipped folder, for example cd Desktop\rubygems-1.8.12 and
run setup ruby.rb
3. (optional) You can check running gem -v that the version is now 1.8.12.

Install rails: Type: gem install rails and wait a while...


Here follows the easiest way to use ruby on rails with the SQLite3 dbms.
Type gem install sqlite3 into the cmd window; it will install the sqlite3 gem.
Download from the official SQLite3 web page the following files:

The command-line shell: sqlite-shell-win32-x86-3070900.zip


The dll libraries: sqlite-dll-win32-x86-3070900.zip
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Unzip both of them and put all the files in your Rails bin folder under Rails directory (in my case is
C:\Rails192\bin)
Create a project: type rails new myapp in the cmd console.
Type cd myapp to put the console into your project folder
Type rake db:create in order to build the test and development databases.
If the console answer you with the error: Rake aborted! Uninitialized constant Rake::DSL you
have to add the line: require 'rake/dsl_definition' on the first line in the file named Rakefile in the
directory of your project.
Repeat the commands rake db:create and rake db:migrate to check if the error is gone.
Type rails server to turn on the server, and surf on http://localhost:3000 to check if the rails
server is working correctly!
Now you can create your web applications, if you're a newbie my advise is to start from the official
documentation.
Coming soon the steps for using ruby on rails with MySQL dbms, be patient!

I hope that everything went the right way, check the comments below, feel free to post comments or
issues, please provide me a feedback ;-) AND DON'T FORGET TO +1 !
Posted 22nd December 2011 by Manuele Dones
Labels: ruby on rails mysql sqlite3 windows

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Google+ API simple example

SEP

22

Since I got some troubles to get working the google+ API, I'd just like to write how I solved my problem.
Have a look at the official Google+ API.
On first you have to activate the Google+ API on the apis console web site
Then I thought a simple AJAX calling would work, like
v ar url="https://w w w .googleapis.com/plus/v 1/people/105108020644809221643?key=##yourKey##";
aj ax.open("GET", url, true); //ajax is an xmlHttpRequest (cross-browser) objec t
aj ax.send(null);
if ( aj ax.readyState == 4 ) {
// your code
}

Unluckily this didn't work, I received the error message: Origin is not allowed by Access-ControlAllow-Origin.

I suppose the error is related with the xmlHttpRequest object: it only receives xml or text data. In fact
resources in the Google+ API are represented using JSON data formats.

A possible solution may be to "translate" the json file returned from the Google server in a javascript
variable, something like:
var jsondata = eval(" ("+ajax.responseText+ ") ")
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

anyway, I think the easiest solution is to use a jQuery.ajax function:

$.aj ax({
url: "https://w w w .googleapis.com/plus/v 1/people/105108020644809221643?key=##yourKey##",
context: document.body,
dataType: 'j sonp',
success: function(data){
alert(data.aboutMe);
}
});

That's all!! Feel free to post comments, please provide me a feedback ;-) AND DON'T FORGET TO
+1' !

Posted 22nd September 2011 by Manuele Dones


Labels: Origin is not allowed by Access-Control-Allow-Origin, JSONP, example, Google+, Google+ API,
API, Ajax, Json, How to use google api, error

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

JUL

TRENORD: piantina linee ferroviarie lombardia

15

Trenord, linee ferroviarie

Posted 15th July 2011 by Manuele Dones


Labels: lombardia, piantina, FNM, TRENORD, linee ferroviarie

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

You might also like