How to get LovdByLess up and running USERS WHO ARE UPGRADING READ THE UPGRADE NOTES WINDOWS USERS READ THIS: http://www.gamutworks.net/blog/?p=17 UBUNTO USERS READ THIS: http://groups.google.com/group/lovdbyless/browse_thread/thread/d29043342c47f06?hl=en START BY MAKING SURE your ruby gems are version 1.2.0 or greater: * (sudo) gem update --system Then add the github repo to your gems: * gem sources -a http://gems.github.com * Lovd runs on Ruby on Rails, so first you need to get rails running. Go download rails (http://rubyonrails.org/down) and follow it's instructions to get rails running. * The directions in this README file assume some knowledge of rails, but I'll go through it a bit here first. * The first thing to do is install the ruby gems that are required. For each gem listed in the README, at the command line, do something like "gem install [gem name]" or "sudo gem install [gem name]". * The next thing to do is set up your database (steps 1-4 in the README). Lovd is setup to use MySQL by default, so just follow the instructions in the README and configure the files for your computer. * Skip step 5. * Now setup global variable (site name and url and stuff) (steps 6-13) and change the (r)html and css to suit your taste. * In dev mode, search (steps 14-16) should work right out of the box (assuming you install the gems). The search instructions are really for a production environment. * Start lovd with the typical "./script/server" and point your browser to "http://localhost:3000". Instructions: Quick Setup (currently for non-Windows users only - due to ferret gem issues): 1. Edit config/database.yml.tmp to reflect the database names you would like to use. 2. Edit config/environments/production.rb so asset_host reflects the name of the production asset server 3. cp config/database.yml.tmp config/database.yml 4. MAKE SURE YOU UPGRADE TO GEMS 1.3. 5. RUN gem sources -a http://gems.github.com 6. rake lovdbyless:getting_started 7. rake test 8. See step #6 below to continue setup (near "Setup default values") The getting_started rake task will install all required gems, create the databases in database.yml, and migrate the development and test databases. Manual Setup: Install the Required Gems: 1. Install these gems: - rflickr - RedCloth - rmagick (will require ImageMagick, which is not a gem) - win32console (windows only) (The other gems are already provided in the vendor gems dir.) 2. Run "rake gems:build" to build the gems that need building TIPS: Installing ImageMagick and RMagick See these posts for tips: http://b.lesseverything.com/2007/9/26/installing-imagemagick-and-rmagick-on-mac-os-x http://www.randycullom.com/chatterbox/archives/2006/12/installing_imag.html Setup the databases: 1. Edit config/database.yml.tmp to reflect the database names you would like to use. 2. cp config/database.yml.tmp config/database.yml 3. rake db:create:all 4. rake mig a=no All tests pass: 5. rake Setup default values: 6. Edit config/initializers/exception_notifier.rb 7. Edit the config/environment.rb file and change the config.action_controller.session data 8. Edit config/environments/development.rb and production.rb to suit your tastes. (Specifically config.action_mailer.delivery_method) 9. Change the values in config/initializers/global_variables.rb to match your site and domain. (Specifically SITE_NAME, SITE, MAILER_TO_ADDRESS, MAILER_FROM_ADDRESS, REGISTRATION_RECIPIENTS) 10. Go to the section "About flickr integration" and follow the steps to either use flickr or not. 11. Edit public/404.html, public/500.html, app/views/account_mailer/* 12. Edit application.css to suite your tastes. 13. Edit app/views/home/terms. Install Sphinx: 14. Go here and get the latest sphinx: http://sphinxsearch.com/downloads.html 15. You can follow these commands: wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz tar zxvf sphinx-0.9.8.1.tar.gz cd sphinx-0.9.8.1 ./configure make sudo make install Configure Thinking Sphinx: 16. rake ts:start 17. rake ts:in 18. Rake ts:start again in sphinx is not running. 19. Create a cron job that will rake ts:in every hour. This will make any changes made in the last hour searchable. It should look something like this: 0 * * * * cd /var/rails/lovdbyless/current/ && rake ts:in RAILS_ENV=production Note: remember that to call rails vi cron you have to make sure your crontab has a PATH variable set up. Include something like this at the top of your crontab: PATH=/usr/bin:/bin:/sbin:/usr/sbin:/sbin:/usr/local/bin Start Lovd By Less: 20. ./script/server 21. Go to the home page http://localhost:3000 22. Go to the signup page and create an account. 23. Go into the database and turn the is_admin flag to true on your new account. About flickr integration If you WANT to have flickr integration in your Lovd By Less project, follow these setup instructions: 1. Go http://flickr.com/services/api/keys/apply/ to apply for a flickr api key. 2. Copy the Key and Secret into config/initializers/flickr.rb 3. From the command line, run "ruby script/authorize_flickr.rb" and follow the instructions. This stores the flickr auth stuff into config/flickr.cache. If you add this cache file to your source control, then you shouldn't have to repeat this in production. Alternatively, you can get a different key for production, if you'd like. If you DO NOT WANT to have flickr integration in your Lovd By Less project, follow these setup instructions: 1. Delete line 15 from app/controllers/profiles_controller.rb [@flickr = @profile.flickr_username.blank? ? [] : flickr_images(flickr.people.findByUsername(@profile.flickr_username))] 2. Delete lines 22-35 in app/views/profiles/_public.html.erb Is there a google group for this project? Yes. It can be found here: http://groups.google.com/group/lovdbyless How to change the page a user is redirected to after login or signup: In AccountController.rb, look for lines that contain: redirect_back_or_default home_path and change either home_path to the path you want to send them to, or change redirect_back_or_default to redirect_to, or both. Why is public/javascripts/less_routes.js always modified and needing to be checked in? I swear I didn't touch it. less_routes.js is automatically generate when your app starts. Any changes to this app will be lost the next time it's generated. Hey, I get some mysql errors when installing the mysql gem. What the funk? If you get errors that look something like "dlsym(0x10ef660, Init_mysql): symbol not found" when installing your mysql gem, it may be due to an inconsistency in the build architecture of mysql, ruby, the mysql gem or all three. Reinstall the aforementioned components as necessary using the i386 build.
stevenbristol/lovd-by-less
Open Source Social Network written in Ruby on Rail by Less Everything
RubyNOASSERTION