Skip to content

Obsolete doc for Jennifer #133

Closed
Closed

Description

@Pepan

Hi.
I am new to Crystal and Amber - coming from Rails world ... so I don't know how to fix that... but following doc for Jennifer leads to not working environment

 crystal sam.cr -- generate:migration CreateUser
Error: unknown command: sam.cr

I manage to run sam.cr by moving it from src/ to ./ and fixing paths

  • but it leads to errors like
Error in src/sam.cr:3: undefined local variable or method '​'

fixed by jumping to next line and press del until it jumps to above line - then enter to move it to new line ... there are some strange characters in code taken from doc ...

  • i am very lazy from Ruby and Rails and this not working guerrilla environment makes me frustrated ...
    Jennifer is open gate for people like me and we will not try some experimental ORM which are default and are not able to manage things way I am accustomed from ActiveRecord ... I thing that default should be Jennifer for smooth transition ;) to try Crystal and Amber. And if somebody is not satisfied with AR - they he can try some new ...

Activity

  1. changed the title [-]Obsollete doc for Jennifer[/-] [+]Obsolete doc for Jennifer[/+] on Jan 16, 2019
  2. drujensen commented on Jan 16, 2019

    @drujensen
    Member

    Jennifer is open gate for people like me and we will not try some experimental ORM which are default and are not able to manage things way I am accustomed from ActiveRecord

    Jennifer is just as experimental as Granite. I find Granite is actually closer to ActiveRecord in many ways i.e. finders and relationships. Did you try both to make this judgement call?

  3. Pepan commented on Jan 17, 2019

    @Pepan
    Author

    I understand that it all is still in early state of development ...

    Granite - I was discouraged by SQL migrations...

  4. drujensen commented on Jan 17, 2019

    @drujensen
    Member

    Yeah, this is a nice DSL:

    class CreateContact < Jennifer::Migration::Base
      def up
        # Postgres requires to create specific enum type
        create_enum(:gender_enum, ["male", "female"])
        create_table(:contacts) do |t|
          t.string :name, {:size => 30}
          t.integer :age
          t.integer :tags, {:array => true}
          t.field :gender, :gender_enum
          t.timestamps
        end
      end
    
      def down
        drop_table :contacts
        drop_enum(:gender_enum)
      end
    end
    

    There is a ticket in Granite to add something similar: amberframework/granite#182

  5. eliasjpr commented on May 9, 2021

    @eliasjpr
    Contributor

    Addressed with #186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions