Giter Club home page Giter Club logo

mstwjs_code's People

Contributors

noelrappin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mstwjs_code's Issues

Sqlite?

Hi,

Is there anything specific with mysql as to why thats required?

Trying to help a friend setup on a windows machine and mysql is failing to install :(

Wondering if it might be easier to revert to the sqlite option...

Thanks,
Chris

Ubuntu Instructions

Railsinstaller is Win/Mac only. All I know about Ruby is that every time I've tried to install it on Ubuntu and get it working, I was left wondering how anything that's such a PITA to get up and running could be so popular. Nevertheless, I bashed it out. (Linux humor :) .)

UPDATE: The default jasminerice gem in the Gemfile does not play nicely with rvm. See http://www.ihid.co.uk/blog/using-jasmine-in-a-rails-engine and:

  • Stop the server
  • Change the 'jasminerice' line in the Gemfile.
  • Add the spec/dummy/config/initializers/jasminerice.rb file.
  • Clear tmp/cache (rm -r tmp/cache/assets) to remove any leftovers in the cache.
  • Start the server
  • Set up tests

TL;DR instructions

cd ~
\curl -sSL https://get.rvm.io | bash -s -- --ignore-dotfiles
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc  [footnote 1]
source ~/.rvm/scripts/rvm
rvm install 1.9.3  [footnote 2]
curl https://raw.github.com/creationix/nvm/master/install.sh | sh
vi ~/.bashrc [footnote 1]

Add source ~/.nvm/nvm.sh to the bottom of .bashrc. Save. Quit.

nvm ls-remotes
nvm install <version> [footnote 3]
nvm use <version>
cd mstwjs_code [footnote 4]
bundle install [footnote 5]
vi config/database.yml

Find 3 instances of /tmp/mysql.sock and replace with /var/run/mysqld/mysqld.sock. [footnote 6]

rake mstwjs:setup
rails server

Navigate to localhost:3000 in your web browser. You should get a web page back.

Footnotes

  1. bashrc for me, might be .bash_profile or something else for you
  2. I used 1.9.3, but 1.9.1 should work and should have a binary, will save you compile time.
  3. Use 0.10.x or 0.12.x versions. Even numbers are stable, odds are unstable.
  4. Or whatever you called the directory where you cloned the repo.
  5. If you get an error regarding mysql2, sudo apt-get install libmysql-ruby libmysqlclient-dev and try again.
  6. head -25 /etc/mysql/my.cnf to confirm the socket file path.

Detailed version, in case you run into any of the same errors or are tempted to make the same mistakes

  • Installed Ruby (1.9.1) and Rails (3.2) from the Ubuntu repos
  • Ran rake mstwjs:setup in the mstwjs directory, it failed (could not find rake-0.9.2.2 in any of the sources)
  • Ran bundler install (per rake fail's recommendation), it installed a bunch of gems until mysql failed
  • Installed libmysql-ruby and libmysqlclient-dev (2.8.2) from Ubuntu repos
  • Ran bundler install again, completed successfully
  • Ran rake mstwjs:setup, got permissions failure.
  • Swept up pile of hair pulled so far
  • Google returns info on RVM, install RVM
  • rvm install 1.9.3
  • Slap forehead hard with brick, probably should have picked 1.9.1 (binary vs. compile)
  • Take nap while Ruby compiles
  • On mstwjs directory, run rake again, get "run 'bundle install'" message again (sigh)
  • bundle install, zzz
  • rake mstwjs:setup, fails with mysql socket error
  • Google returns guidance to change config/database.yml to point to proper directory for Ubuntu (/var/run/mysqld/mysqld.sock), change yml
  • rake mstwjs:setup starts creating tables... then fails for socket again???
  • grep reveals to more references to wrong socket file, fix
  • rake mstwsj:setup... seems to work this time
  • rails server... seems to work, yay!
  • localhost:3000... ExecJS::RuntimeUnavailable in Trips#index
  • while (!unconscious) {head.bashOnDesk()};
  • ...
  • Go to github page error referenced... Node.js??? If only this whole thing were in Node. Book 5, writing the server application in Node!
  • kill server
  • nvm use 0.10.24 (already have Node installed and runnable)
  • rails server, localhost:3000, works

Elapsed time: 2 hours.

Why am I still here?

Because this is the only book I've found that teaches JavaScript, TDD/BDD, and a practical, real-world workflow in an integrated fashion. I can buy half a dozen books covering JavaScript, jQuery, Jasmine, and the rest, but they're disconnected and don't show how to make everything work together.

And, seriously, consider writing Book 5 on Node.js. It's a logical progression and would let you get rid of the Ruby/Rails dependency on Node. You can probably store the data in a JSON file and keep it in memory and eliminate the MySQL dependency too. Alternatively, CouchDB/MongoDB seem to be popular in the Node community.

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.