Dev Env Setup
Dev Env Setup
Dev Env Setup
Setup Ubuntu
# Subversion checkout:
svn checkout --no-auth-cache --username extrovert --password extrovert
http://exv01.tii.trb/svn/extrovert/trunk/
# Install RubyGems:
cd
sudo wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
tar -xvzf rubygems-0.9.2.tgz
cd rubygems-0.9.2
sudo ruby setup.rb
cd ..
rm -r rubygems-0.9.2.tgz --force
cd /var/www/metromix/config
cp ./database.example ./database.yml
# Build project
cd /var/www/cms
rake db:migrate
cd /var/www/metromix
rake db:migrate
# Make executable
chmod a+x mysql-admin.safe
# Edit the GUI launch shortcut for mysql-admin to modify the launch command from
/usr/bin/mysql-admin to
/usr/bin/mysql-admin.safe
From VMware.com:
vmware-toolbox &
You can run VMware Tools as root or as a normal user. To shrink virtual disks or to
change any VMware Tools scripts, you must run VMware Tools as root (su -).
Note:
Always run vmware-toolbox in the guest operating system to ensure you have access to
all VMware Tools features, such as copy and paste and mouse ungrab for operating
systems for which X display driver is not available.
4. MS Windows Setup
set http_proxy=http://163.194.240.99:9119
Ruby 1.8.4 and Gems 0.9.1 (to update your Gem's version, do: "gem update --system")
Mysql 5 (on your DOS prompt, to try logging in: "mysql -uroot -ppassword". Note that
with spaces, i.e. "mysql -u root -p password" doesn't work. There is probably already a
"test" database there, that MySQL creates upon installation. )
Subversion 1.4
RMagick
Then, install the rmagick gem from the above temporary directory.
Restart your computer after this installation (if you don't the build may have difficulty
finding the ImageMagick? libraries)
# Subversion checkout:
set http_proxy=http://163.194.240.99:9119
gem install rails --include-dependencies
gem install rspec --include-dependencies
gem install rcov --include-dependencies
gem install memcache-client --include-dependencies
gem install mysql
# Create databases:
extrovert_images_development, extrovert_images_test,
extrovert_pubwrite_development, extrovert_pubwrite_test,
extrovert_pubwrite_production,
extrovert_registered_users_development, extrovert_registered_users_test
extrovert_registered_users_production
and assign them to some user. Give that user permisions to access.
Make sure the two database.yml files point to your databases and use your users as set up
above
# Migrate the DB
Both projects share the db, but only cms has the migrations, so:
In trunk/cms
rake db:migrate
and
rake db:migrate RAILS_ENV=test
Note:
If you have problems with the db:migrate for metromix, you may need to copy the
pubwrite_test target from cms/config/database.yml to metromix/config/database.yml.
rake cruise:all
might fail because of rcov problems, so try:
rake cruise:no_rcov_all
C:\WINDOWS\system32\drivers\etc
file is called "hosts"
add this line at the bottom:
127.0.0.1 chicago.localhost
you will probably need to add more as you bounce around to different cities
# SOLR SETUP
<Context docBase="C:/mmx/trunk/solr/solr-webapp"
type="java.lang.String" value="C:/mmx/trunk/solr/indexes/extrovert"
override="true" />
</Context>
**** Even though your netstat output does not show the ports
5000, 8005, 8009 as used..solr cannot access them for some reason
-------------------------------------------
#!/bin/sh
CATALINA_BASE=C:/mmx/trunk/solr
# end JRH
export CATALINA_BASE=${CATALINA_BASE}
CATALINA_HOME=C:/apache-tomcat-5.5.20
JRE_HOME=C:/Java/jdk1.5.0.03/jre
# end JRH
export JRE_HOME=${JRE_HOME}
JAVA_OPTS="-Xms128m -Xmx128m"
export JAVA_OPTS=${JAVA_OPTS}
CATALINA_PID=${CATALINA_BASE}/logs/pid
export CATALINA_PID
${CATALINA_HOME}/bin/catalina.sh $*
----------------------------------------------------------
Start Solr:
solr/bin/solr.sh run
use run so that it runs it in the same window.. and you can see the results of the run. You'll
see error messages but Solr may still start up regardless.
If you dont want to use cygwin you can configure your solr to work with windows like
so.. Create a solr/bin/solr.bat file in the same folder as solr.sh and add the following
entries
set CATALINA_BASE=C:/mmx/trunk/solr
set CATALINA_HOME=C:/apache-tomcat-5.5.20
set JRE_HOME=C:/Java/jdk1.5.0.03/jre
set CATALINA_PID=%CATALINA_BASE%/logs/pid
%CATALINA_HOME%/bin/catalina.bat %1
C:\mmx\trunk\solr\bin>solr.bat run
laptop:~/tmp/solr-tomcat> cp -r solr-nightly/example/solr .
Solr index:
http://exv01.tii.trb:10000/extrovert/attachment/wiki/SolrIndex/index.tgz
put the files in the zip file into mmxtrunk\solr\indexes\extrovert\data\index
Change the port to match what you're using (from 5000 to 5001)
mmx/trunk/metromix/config/environment/development.rb
#solr settings - set the correct host and port
SEARCH = {
:host => 'localhost',
:port => 5001, # was 5000
:context => '/solr-extrovert',
:update_path => '/update',
:select_path => '/select'
}
(You *might* need to do the same thing for
mmx/trunk/cms/config/environment/development.rb, if cms uses Solr also)
If you've set up correctly, you'll see a page, but when you click on the "After hours" link
on the left, it complains no database "extrovert_images_development"... that means the
code uses a newer db version and I need to do:
mmxtrunk\cms> rake db:migrate