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
    kim@chips:~/git/taichi/taichi_rails$ curl -I http://taichi-school.dev.azk.io
    HTTP/1.1 301 Moved Permanently
    content-type: text/html
    location: https://taichi-school.dev.azk.io/
    connection: close
    content-length: 0
    Date: Fri, 25 Mar 2016 19:43:22 GMT
    Everton Ribeiro
    @nuxlli
    this apps is rails app?
    Dr Kim Foale
    @kimadactyl
    yes. im using a spree, an ecommerce app on it though. maybe thats doing something? hmmmm
    i have the custom database.yml running so cant easily check hmm
    Everton Ribeiro
    @nuxlli
    try this:
    # ../config/initilizers/spree.rb
    Spree.config do |config|
      config.allow_ssl_in_production = false #This line
    end
    after this, restart app: azk restart
    Dr Kim Foale
    @kimadactyl
    full response, kinda long sorry
    kim@chips:~/git/taichi/taichi_rails$ azk restart
    azk: ↓ stopping `taichi-school` system, 1 instances...
    azk: ↓ stopping `postgres` system, 1 instances...
    azk: ↑ starting `taichi-school` system, 1 new instances...
    azk: ↑ starting `postgres` system, 1 new instances...
    azk: ✓ checking `azukiapp/ruby:2.3.0` image...
    azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
    azk: ⎘ syncing files for `taichi-school` system...
    azk: ◴ waiting for `taichi-school` system to start, trying connection to port http/tcp...
    azk: An error occurred. It will stop all instances already running. See details below.
    
    azk: ↓ stopping `postgres` system, 1 instances...
    azk: System `taichi-school` not running
    azk: Run system `taichi-school` return: (1), for command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port=3000","--binding=0.0.0.0"]:
    azk:  .taichi-school [log] >  => Booting Puma
    azk:  .taichi-school [log] >  => Rails 4.2.6 application starting in production on http://0.0.0.0:3000
    azk:  .taichi-school [log] >  => Run `rails server -h` for more startup options
    azk:  .taichi-school [log] >  => Ctrl-C to shutdown server
    azk:  .taichi-school [log] >    Spree::Preference Load (0.5ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/layout"]]
    azk:  .taichi-school [log] >     (0.2ms)  BEGIN
    azk:  .taichi-school [log] >    Spree::Preference Exists (0.4ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/layout' AND "spree_preferences"."id" != 2) LIMIT 1
    azk:  .taichi-school [log] >     (0.1ms)  COMMIT
    azk:  .taichi-school [log] >    Spree::Preference Load (0.2ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/track_inventory_levels"]]
    azk:  .taichi-school [log] >     (0.1ms)  BEGIN
    azk:  .taichi-school [log] >    Spree::Preference Exists (0.3ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/track_inventory_levels' AND "spree_preferences"."id" != 3) LIMIT 1
    azk:  .taichi-school [log] >     (0.1ms)  COMMIT
    azk:  .taichi-school [log] >    Spree::Preference Load (0.2ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/address_requires_state"]]
    azk:  .taichi-school [log] >     (0.1ms)  BEGIN
    azk:  .taichi-school [log] >    Spree::Preference Exists (0.2ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/address_requires_state' AND "spree_preferences"."id" != 4) LIMIT 1
    azk:  .taichi-school [log] >     (0.1ms)  COMMIT
    azk:  .taichi-school [log] >    Spree::Preference Load (0.2ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/allow_guest_checkout"]]
    azk:  .taichi-school [log] >     (0.1ms)  BEGIN
    azk:  .taichi-school [log] >    Spree::Preference Exists (0.2ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/allow_guest_checkout' AND "spree_preferences"."id" != 5) LIMIT 1
    azk:  .taichi-school [log] >     (0.1ms)  COMMIT
    azk:  .taichi-school [log] >  Exiting
    azk:  .taichi-school [log] >  /azk/bundler/ruby/2.3.0/bundler/gems/spree-f1b3b8a85275/core/app/models/spree/preferences/configuration.rb:66:in `method_missing': undefined method `allow_ssl_in_production=' for #<Spree::AppConfiguration:0x0055dac058b948> (NoMethodError)
    azk:  .taichi-school [log] >      from /azk/taichi_rails/config/initializers/spree.rb:22:in `block in <top (required)>'
    azk:  .taichi-school [log] >      from /azk/bundler/ruby/2.3.0/bundler/gems/spree-f1b3b8a85275/core/lib/spree/core.rb:45:in `config'
    azk:  .taichi-school [log
    oh it truncated it np. guessing the problem is with with the command
    Everton Ribeiro
    @nuxlli
    search for "config.force_ssl" in "./config" config files
    grep "config.force_ssl" -R ./config
    Dr Kim Foale
    @kimadactyl
    ahha. caught it in config/environemnts/production.rb
    same error
    Everton Ribeiro
    @nuxlli
    what, you removed this?
    # ../config/initilizers/spree.rb
    Spree.config do |config|
      config.allow_ssl_in_production = false #This line
    end
    Dr Kim Foale
    @kimadactyl
    there was nothing there before and i added that line
    i changed config.force_ssl = false in config/environments/production.rb
    it was on true, perhaps something to do with heroku
    Everton Ribeiro
    @nuxlli
    it is wrong, it is for an old version of spree
    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
    :/