Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dr Kim Foale
    @kimadactyl
    whoop ok
    Everton Ribeiro
    @nuxlli
    the rails in the spree change frequently, what can this forcing redirect to http may be in multiple locations
    Dr Kim Foale
    @kimadactyl
    ok it lives :) kindaaaa
    getting plain text output no styling
    Everton Ribeiro
    @nuxlli
    you have an entry like RAILS_ENV: "development" in yours Azkfile.js?
    Dr Kim Foale
    @kimadactyl
    have to use the port still
    Everton Ribeiro
    @nuxlli
    echo "RAILS_ENV=development" >> .env
    echo "RACK_ENV=development" >> .env
    so you force the way development locally
    azk restart
    curl -I http://taichi-school.dev.azk.io
    Dr Kim Foale
    @kimadactyl
    :o working! sorta!
    Everton Ribeiro
    @nuxlli
    \o/
    Dr Kim Foale
    @kimadactyl
    seems db isnt working i thinkkk
    Everton Ribeiro
    @nuxlli
    rsrs
    rs = ha
    Dr Kim Foale
    @kimadactyl
    yeah but if i have to manually put in a port for the domain name then maybe the db is the same?
    like i cant connect without the port
    kim@chips:~/git/taichi/taichi_rails$ curl -I http://taichi-school.dev.azk.io
    HTTP/1.1 200 OK
    x-frame-options: SAMEORIGIN
    x-xss-protection: 1; mode=block
    x-content-type-options: nosniff
    content-type: text/html; charset=utf-8
    etag: W/"5ab6c5963f3355dbd83d73d262fc12fa"
    cache-control: max-age=0, private, must-revalidate
    set-cookie: guest_token=IjBKSVpGb0ItRjlFbXdRNUpwMVk3MWcxNDU4OTM2MTQxNjQ1Ig%3D%3D--bf5e5db4f198c9cbecfb7d81a311817ee32f29c4; path=/; expires=Tue, 25 Mar 2036 20:02:21 -0000
    set-cookie: request_method=HEAD; path=/
    set-cookie: _taichi_rails_session=bjBhUjljT01lT0hXdXd0UnhaRS9hbG42TVpua0I1b3VJdERXUkNsa0ZtRlN1b1hRdXZxOElGaEM5MzlkYlBnVVRxekdnUlFZbTQ3RzgvMlg3aHIzSm9xREJGUTVLOEkrbHltZ2Y2TUhJb3JYczhzQTRvTVY0N1BOanVSeGdLWmRxVE9CcVRBWjBHTjFRY1lFL1pYVkt3PT0tLWVBMjJIODBHSW8rRUZoSGV3eTJDNXc9PQ%3D%3D--254ef468969686a1c8269be7f4313387022478df; path=/; HttpOnly
    x-request-id: 9c869337-ae86-4a51-95e4-c036ba434cf1
    x-runtime: 0.332885
    connection: close
    Date: Fri, 25 Mar 2016 20:02:21 GMT
    oh rs is brazilian portugese for ha? nice :D
    Everton Ribeiro
    @nuxlli
    probably you are still having to put the port because browser cache still live
    Dr Kim Foale
    @kimadactyl
    ok
    restart?
    chrome cache is bane of my web dev life hah
    Everton Ribeiro
    @nuxlli
    what, we will correct the db
    try this:
    Dr Kim Foale
    @kimadactyl
    oh it just started working portless :) apparently whine enough and it works
    Everton Ribeiro
    @nuxlli
    azk stop
    azk shell postgres -- rm -Rf '/var/lib/postgres/data/*'
    azk start -R
    Dr Kim Foale
    @kimadactyl
    no luck
    Everton Ribeiro
    @nuxlli
    :/
    output?
    Dr Kim Foale
    @kimadactyl
    kim@chips:~/git/taichi/taichi_rails$ azk stop
    azk: ↓ stopping `taichi-school` system, 1 instances...
    azk: ↓ stopping `postgres` system, 1 instances...
    
    ┌───┬───────────────┬───────────┬──────────────────────────┬─────────────────┬─────────────┐
    │   │ System        │ Instances │ Hostname/url             │ Instances-Ports │ Provisioned │
    ├───┼───────────────┼───────────┼──────────────────────────┼─────────────────┼─────────────┤
    │ ↓ │ postgres      │ 0         │ dev.azk.io               │ -               │ -           │
    ├───┼───────────────┼───────────┼──────────────────────────┼─────────────────┼─────────────┤
    │ ↓ │ taichi-school │ 0         │ taichi-school.dev.azk.io │ -               │ 4 hours ago │
    └───┴───────────────┴───────────┴──────────────────────────┴─────────────────┴─────────────┘
    kim@chips:~/git/taichi/taichi_rails$ azk shell postgres -- rm -Rf '/var/lib/postgres/data/*'
    kim@chips:~/git/taichi/taichi_rails$ azk start -R
    azk: ↑ starting `postgres` system, 1 new instances...
    azk: ✓ checking `azukiapp/postgres:9.4` image...
    azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
    azk: ↑ starting `taichi-school` system, 1 new instances...
    azk: ✓ checking `azukiapp/ruby:2.3.0` image...
    azk: ↻ provisioning `taichi-school` system...
    azk: ⎘ syncing files for `taichi-school` system...
    azk: ◴ waiting for `taichi-school` system to start, trying connection to port http/tcp...
    
    ┌───┬───────────────┬───────────┬─────────────────────────────────┬─────────────────┬───────────────────┐
    │   │ System        │ Instances │ Hostname/url                    │ Instances-Ports │ Provisioned       │
    ├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼───────────────────┤
    │ ↑ │ postgres      │ 1         │ dev.azk.io                      │ 1-data:32788    │ -                 │
    ├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼───────────────────┤
    │ ↑ │ taichi-school │ 1         │ http://taichi-school.dev.azk.io │ 1-http:32789    │ a few seconds ago │
    └───┴───────────────┴───────────┴─────────────────────────────────┴─────────────────┴───────────────────┘
    kim@chips:~/git/taichi/taichi_rails$
    Everton Ribeiro
    @nuxlli
    cat config/database.yml
    Dr Kim Foale
    @kimadactyl
    its your one
    kim@chips:~/git/taichi/taichi_rails$ cat config/database.yml
    <%
    require 'cgi'
    require 'uri'
    begin
      uri = URI.parse(ENV["DATABASE_URL"])
    rescue URI::InvalidURIError
      raise "Invalid DATABASE_URL"
    end
    env = ENV["RAILS_ENV"] || ENV["RACK_ENV"]
    raise "No RACK_ENV or RAILS_ENV found" unless env
    def attribute(name, value, force_string = false)
      if value
        value_string =
          if force_string
            '"' + value + '"'
          else
            value
          end
        "#{name}: #{value_string}"
      else
        ""
      end
    end
    database = "#{(uri.path || "").split("/")[1]}_#{env}"
    username = uri.user
    password = uri.password
    host     = uri.host
    port     = uri.port
    params   = CGI.parse(uri.query || "")
    params["encoding"] = ["utf8"] unless params["encoding"].present?
    params["pool"    ] = [5]      unless params["pool"    ].present?
    adapter = case uri.scheme.to_s
              when "postgres" then "postgresql"
              when "mysql"    then "mysql2"
              else uri.scheme.to_s
              end
    %>
    
    <%= env %>:
      <%= attribute "adapter",  adapter %>
      <%= attribute "database", database %>
      <%= attribute "username", username %>
      <%= attribute "password", password, true %>
      <%= attribute "host",     host %>
      <%= attribute "port",     port %>
    
    <% params.each do |key, value| %>
      <%= key %>: <%= value.first %>
    <% end %>
    which tbh i dont like cuz i cant load it locally now :D but w/e for time being
    Everton Ribeiro
    @nuxlli
    the way around this ;)
    I can see the database error?
    Dr Kim Foale
    @kimadactyl
    wait. im a dumbass. ive not pushed my db data. lol
    sorry
    how do i push over my database to the azk image?
    Everton Ribeiro
    @nuxlli
    hahaha
    Gullit Miranda
    @gullitmiranda
    Whatsapp format of your data?
    Dr Kim Foale
    @kimadactyl
    erm just a postgres database
    Gullit Miranda
    @gullitmiranda
    SQL dump file or seed?
    Dr Kim Foale
    @kimadactyl
    (fwiw i hate postgres i only migrated for heroku)
    Gullit Miranda
    @gullitmiranda
    You prefer mysql?
    Dr Kim Foale
    @kimadactyl
    i dont care at this point
    lol
    Everton Ribeiro
    @nuxlli
    @gullitmiranda will help you because he has more experience with the use of images