tasks:
-
set up rvm gemset environment
rvm --rvmrc --create 2.0.0@global
-
run rails new
rails new mdot
-
change gemfile to specifically ask for ruby 2.0
| 1. first run the pg version of dbconsole in heroku by using this command : | |
| heroku pg:psql --remote heroku (<staging>) | |
| 2. list the tables in psql by using this command | |
| \dt | |
| 3. get the proper name of the table and list the schema by using this command |
Let’s assume we have an existing project called ‘foo’ and we want to create a fork called ‘bar’.
First, create a new project on GitHub called ‘bar’.
Next, clone foo using the name ‘bar’:
$ git clone [email protected]:YOURNAME/foo.git bar
$ cd bar
Next, edit your Git config file and replace the origin URL with your new URL:
| fix with build edit scheme > diagnostics > enable NS zombie objects | |
| will put a zombie (blank) object where the missing objet is and give you a error msg as to where the problem is |
| resque-web --- launch the web inteface | |
| to have Resque available on the website : | |
| mount the Resque::Server to the routes | |
| add the server requirement to the resque gem | |
| add HTTP authentication to the Resque::Server | |
| 1. make staging.rb in config/environments - copy production.rb for starters | |
| 2. in database.yml , application.yml , cloudinary.yml ... any .yml file , copy the production block and name it staging | |
| 2b. if you are using Resque - make a staging env in initializers/resque.rb | |
| 2c. add staging constants for any system-wide URLs | |
| 3. heroku create --remote staging <staging_app_name> --addons [any add ons here]. | |
| create the staging area of the config file | |
| <staging_app_name> is the part of the url before '.herokuapp.com' -- muy importante , dont forget | |
| 4. heroku config:add RACK_ENV=staging RAILS_ENV=staging --remote staging | |
| set up the rails environment vars | |
| 5. git push staging master |
| git config heroku.remote staging | |
| sets the normal heroku commands to the heroku environment | |
| heroku apps:create <name> --remote staging | |
| heroku config:set RACK_ENV=staging RAILS_ENV=staging --remote staging |
| You can either put | |
| gs = Gift.all; | |
| or | |
| gs = Gift.all; nil | |
| the second one is a little better as it terminates the method , the first one starts a block like behavior in the console |
| git remote show origin | |
| git pull | |
| git checkout remotes/origin/branchname | |
| git checkout -b branchname | |
| simple as load "test/buy_giver.rb" | |
| this file is in the test folder in my rails app |