Giter Club home page Giter Club logo

moto_rent's Introduction

Moto Rent site

This is the Moto Rent system created by Proalab (www.proalab.com) and by Alexandr Basan. In particular, as a first debugging check I suggest getting the test suite to pass on your local machine:

$ cd /tmp
$ cd sample_app
$ cp config/database.yml.example config/database.yml
$ bundle install
$ bundle install --without production - without production gems
$ bundle exec rake db:migrate
$ bundle exec rake db:test:prepare
$ bundle exec rspec spec/

Rails servers start

$ rails s
$ unicorn_rails

Мы можем откатить один шаг миграции с помощью

$ rake db:rollback

Мы будем генерировать модель следующим образом:

$ rails generate model Foo bar:string baz:integer

Это действие может быть отменено с помощью

$ rails destroy model Foo

If the tests don't pass, it means there may be something wrong with your system. If they do pass, then you can debug your code by comparing it with the reference implementation.

GIT

$ git remote add origin https://github.com/<username>/<app_name>.git
$ git push -u origin master

$ git add .
$ git commit -m "Initialize repository"
$ git push

$ git pull - pull repository to server

Create a new repository on the command line

touch README.md

$ git init
$ git add README.md
$ git commit -m "first commit"
$ git remote add origin https://github.com/Proalab/rubyonrails.git
$ git push -u origin master

Push an existing repository from the command line

$ git remote add origin https://github.com/Proalab/rubyonrails.git
$ git push -u origin master

Amazon EC2 = NGIX + Passenger

$ sudo service nginx start
$ sudo service nginx stop
$ sudo service nginx restart

Heroku

$ rake assets:precompile
$ RAILS_ENV=production bundle exec rake assets:precompile
$ git push heroku master
$ heroku rake db:migrate
$ heroku restart
$ heroku open
$
$ heroku logs
$ heroku logs -n 1500

Heroku database https://devcenter.heroku.com/articles/pgbackups https://devcenter.heroku.com/articles/heroku-postgres-import-export or use PGAdmin

$ heroku pgbackups:capture
$ heroku pgbackups:url - backup to url
$ heroku pgbackups:restore DATABASE 'https://s3.amazonaws.com/me/items/3H0q/mydb.dump'

moto_rent's People

Contributors

alexandrbasan avatar

Watchers

 avatar

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.