Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Luca Guidi
    @jodosha
    @bugant cool. :+1:
    olistik
    @olistik

    @jodosha

    @olistik I haven't can you please tell me more?

    I have a paste buffer of 46 lines, do you want me to paste it here or in another context? :-)

    Luca Guidi
    @jodosha
    @olistik here's fine.
    olistik
    @olistik
    $ which rails
    /Users/olistik/.rvm/gems/ruby-2.3.1/bin/rails

    In /Users/olistik/.rvm/gems/ruby-2.3.1/bin/rails:

    load Gem.bin_path('railties', 'rails', version)
    # /Users/olistik/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0.1/exe/rails

    railsties gem

    Within /Users/olistik/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0.1:

    # ./exe/rails
    require "rails/cli"
    # ./lib/rails/cli.rb
    require 'rails/app_loader'
    # ...
    Rails::AppLoader.exec_app
    # ./lib/rails/app_loader.rb
    # searches for the presence of the script `bin/rails` within the current directory `Dir.pwd`
    # *if* there's such file, then load the corresponding `config/boot.rb`
      Object.const_set(:APP_PATH, File.expand_path('config/application', Dir.pwd))
      require File.expand_path('../boot', APP_PATH)
    
        # ./lib/rails/generators/rails/app/templates/config/boot.rb
        ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
        require 'bundler/setup' # Set up gems listed in the Gemfile.
        # subsequent invokations of `require` will respect the newly setup $LOAD_PATH
    
      # with $LOAD_PATH set according to the application's Gemfile, requires the CLI logic
      require 'rails/commands'
    
    # *else* the command is invoked likely to create a new application so give the control back to the version provided
      # ...
    here’s what I got from a trip into Rails-land
    it boils down to detecting the context of the caller (creating a new Hanami app or invoking a command within an already existing application) and then requiring ’bundler/setup’ in the former case
    this way we can avoid prepending bundle exec when invoking each hanami command
    Luca Guidi
    @jodosha
    @olistik Thanks for the trick. Do you want to open a ticket on hanami/hanami? Thanks!
    olistik
    @olistik
    @jodosha more than happy to do so :-)
    Luca Guidi
    @jodosha
    @olistik :green_heart:
    Peter Leitzen
    @splattael

    What about GitHub users w/o (or non-public) email?

    I get this for the GH account splattael (no public email):

    Hanami::Model::NotNullConstraintViolationError: SQLite3::ConstraintException: NOT NULL constraint failed: users.email
    
    /home/ps/.rvm/gems/ruby-2.3.3@pg/gems/hanami-model-0.7.0/lib/hanami/repository.rb:302:in `rescue in create'
    /home/ps/.rvm/gems/ruby-2.3.3@pg/gems/hanami-model-0.7.0/lib/hanami/repository.rb:300:in `create'
    /opt/ps/home/devel/_private/collaborators/lib/collaborators/repositories/user_repository.rb:4:in `find_or_create'
    /opt/ps/home/devel/_private/collaborators/apps/web/controllers/sessions/create.rb:11:in `call'
    /home/ps/.rvm/gems/ruby-2.3.3@pg/gems/hanami-controller-0.8.0/lib/hanami/action/callbacks.rb:195:in `call'
    /home/ps/.rvm/gems/ruby-2.3.3@pg/gems/hanami-controller-0.8.0/lib/hanami/action/callable.rb:71:in `block in call'
    Luca Guidi
    @jodosha
    @splattael Good point, please change the database migration.
    Peter Leitzen
    @splattael
    PR? :D
    Luca Guidi
    @jodosha
    @splattael yup
    @splattael Thank you. I merged the PRs!
    Peter Leitzen
    @splattael
    Thanks! 💜
    Luca Guidi
    @jodosha
    @/all If anyone has finished their own assigment, please let me know! I want to use this app for real in Hanami website ;)
    olistik
    @olistik
    @jodosha can I join the testing organization?
    Cédric Wider
    @cedricwider
    @jodosha can I join the testing organisation, too?
    Luca Guidi
    @jodosha
    sure
    @olistik @cedricwider Invited you
    Nicolò G.
    @nickgnd
    @jodosha can you add me to the testing organization? Thanks :)
    olistik
    @olistik
    @jodosha :thumbsup: :smiley:
    Oana Sipos
    @oana-sipos
    hey :) has anyone recently tried to access https://github.com/organizations/hanami-workshop/settings/applications/443165? I am getting a 404
    Monica Giambitto
    @nirnaeth
    no I haven't
    Oana Sipos
    @oana-sipos
    I am stuck at the same issue as @bugant when he was forgetting OAuth2 secret
    This testing organization, has also an OAuth2 application for authentication. Please check it here: https://github.com/organizations/hanami-workshop/settings/applications/443165 and copy the "Client Secret" in your .env.development
    Monica Giambitto
    @nirnaeth
    what is the problem?
    I am stuck at the new migration :p
    Oana Sipos
    @oana-sipos
    well, I need the secret for the organization which should be found at that link, as I get it
    Monica Giambitto
    @nirnaeth
    aaah, ok sorry, I didn't take a look at the address
    Oana Sipos
    @oana-sipos
    np
    Monica Giambitto
    @nirnaeth
    what version of postgres are you running? I have problems with dropping the constraint in the last migration
    maybe my version is too old.
    Oana Sipos
    @oana-sipos
    9.3.5.1
    what is your error precisely?
    Monica Giambitto
    @nirnaeth
    then it's not :D
    or maybe I'm just retarded.
    so, my error is
    Sequel::DatabaseError: PG::UndefinedObject: ERROR: constraint "email" of relation "users" does not exist
    if I look at how the constraint is named in my db
    Oana Sipos
    @oana-sipos
    Ah, I got that too
    Monica Giambitto
    @nirnaeth
    it's named users_email_key
    how did you solved it?
    because in theory the docs say that you are supposed to use the drop_constraint with the name of the constraint. and they don't match
    Oana Sipos
    @oana-sipos
    I have logged in in PG and created it myself
    so something like
    psql template1
    \l  # to list existing databases
    CREATE DATABASE organizations;
    \l  # to see the db in the list
    \q  # to quit
    Monica Giambitto
    @nirnaeth
    heavy lifting :D
    Oana Sipos
    @oana-sipos
    well, that fixed it :P