Giter Site home page Giter Site logo

medwards / free-library-on-rails Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 5.0 697 KB

Taking the functionality of the Distributed Library Project and moving it to a Rails backend so the code is less fugly

Home Page: http://a50books.herokuapp.com/about

License: GNU Affero General Public License v3.0

Ruby 71.92% JavaScript 5.23% CSS 3.58% Perl 0.25% HTML 19.02%

free-library-on-rails's Introduction

Free Library on Rails

This is an open source web application for organising a distributed library.

This repository has not been updated, maintained, or run in production for a large number of years so this repository is now archived. You are of course welcome to fork it, the license is AGPL as seen in COPYING.

Installation

Here are some basic installation instructions.

  1. Make sure you have Ruby 2.0 or higher as well as Bundler (one way would be to use RVM).

  2. Install dependencies.

    • sudo apt-get install libxslt1-dev libsqlite3-dev libmysqlclient-dev
    • bundle install
  3. rake secret --- copy this and place it as your session key secret in config/initializers/secret_token.rb

  4. Setup the database

    • for production: in config/database.yml edit the database name, username and password.
    • rake db:setup (when upgrading use rake db:migrate)

API tokens are set in config/application.yml. You can get an ISBNdb api token here. There is no guarantee that the API tokens stored in config/application.yml will work for you.

There are other things you can change in config/application.yml (like a tags blacklist if you have problems with swearing or pro-capitalists)

If you have questions about the license please email [email protected]

Features

  • Members can
    • signup and create an account;
    • add their books and videos;
    • search items by name, author or description;
    • loan items after confirmation from the owner (with return date);
    • leave comments about other members as some form of user feedback.
  • Book information by ISBN (from ISBNdb and Google Books).
  • Book covers from Google Books.
  • Send SMS on loan request (optional).
  • Tagging.
  • Librarians may edit all books and tags (optional).

Librarians

In some communities it can be useful to have librarians who help to complete missing information, correct mistakes and help with tagging. To enable this, you need to make one user a librarian by running the following command (replacing [email protected] with the email address of the librarian):

echo "User.where(email: '[email protected]').update_all(librarian_since: Time.now)" | rails console

If you'd like to allow librarians to make other members a librarian, set use_librarian to delegate in config/application.yml. Librarians will then see a button on other users' profile page.

See also

free-library-on-rails's People

Contributors

bct avatar dependabot[bot] avatar heidita avatar medwards avatar wvengen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

free-library-on-rails's Issues

Repository is archived

The project is very old and won't be maintained. Please create your own fork if you're interested in using it.

Suggested Ubuntu version?

I tried installing this on Ubuntu 14.04 and got some errors as follows:
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:migrate
== CaseInsensitiveTags: migrating ============================================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method new' for Rails::Configuration:Module/home/robin/dev/auckland_library_of_things/distributed/software/free-library-on-rails/db/migrate/011_case_insensitive_tags.rb:20:inup'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:370:in up' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:410:inblock (2 levels) in migrate'
/usr/lib/ruby/1.9.1/benchmark.rb:280:in measure' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:410:inblock in migrate'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:119:in with_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:389:inmigrate'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:528:in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:720:inblock (2 levels) in migrate'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:775:in call' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:775:inblock in ddl_transaction'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/transactions.rb:208:intransaction'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:775:in ddl_transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:719:inblock in migrate'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:700:in each' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:700:inmigrate'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:570:in up' /var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/migration.rb:551:inmigrate'
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/railties/databases.rake:153:in block (2 levels) in <top (required)>' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:incall'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in block in execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:ineach'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:inblock in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:ininvoke_with_call_chain'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in invoke' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:150:ininvoke_task'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in block (2 levels) in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:ineach'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in block in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:115:inrun_with_threads'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:100:in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:78:inblock in run'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in standard_exception_handling' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:inrun'
/var/lib/gems/1.9.1/gems/rake-10.3.2/bin/rake:33:in <top (required)>' /usr/local/bin/rake:23:inload'
/usr/local/bin/rake:23:in `

'
Tasks: TOP => db:migrate

I realise the versions of various pieces of software are not what you wrote it against, and before trying to debug on the latest Ubuntu, would like to know which version of the OS you used?

I tried earlier versions of rake (0.9.2.2, 10.0.3), and got errors at the bundle stage.

Fix Github homepage link

The homepage of the project is set to http://freelibrary.ca/ but that site is just a domain registrar's placeholder. I suggest to either remove it, or point it to a real-life installation if it exists (it would be useful to see the software in action).

'Books' menu is empty (region-related?)

The Books menu doesn't have any content and I suspect its because the 'Berlin' region that I configured isn't working as expected and somehow the region filtering is wonky.

My rails doesn't run it

It puts out this message:

Missing the Rails gem. Please gem install -v= rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Smarter search by author

Searching by author often returns books from authors that only have a matching first, middle or last name. As the collection of books grows, the noise may become larger than the actual matching author names.

This could be done by updating the search by author method to always require the last name, and to require the firstname if any is present in the book. Parsing of the search term could be done by nameable (which is already used when importing from Google books).

ISBN lookup passes long descriptions

Using "Working Effectively with Legacy Code" (ISBN 9780131177055) you can get FLOR to construct a GET request so large that the server will reject it (at least rails server). For now we can cover this defect by truncating the book description we pass, but to do it properly we probably want to switch the "lookup" button to a client-side action that fetches the full data and populates the DOM on its own.

Sometimes Google Books has nil author

"The Dosadi Experiment" (ISBN: 0425090493) returns nil for authors in the GoogleBookClient, so nameable stuff breaks when we try to break it open.

It also has a nil description which causes the defect cover for #28 to break without special handling.

Fix missing javascripts in account settings

The accountsettings and tageditor javascripts are missing. This is not a blocking problem, but I guess there are some improvements in the account editing screen missing now.

Author from ISBN often split wrong

When a new book is added using ISBN with an author having more than one first name, the second first name ends up in the author's last name. This has happened more than just a couple of times.

It seems that ISBNdb has separate first and last author names, Google Books only a single name. Perhaps there is some intelligent name splitting gem available somewhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.