inesita-rb / inesita

Frontend web application framework in Ruby using Opal.
https://inesita.fazibear.me/
MIT License
259 stars 15 forks source link

`inesita build` doesn't #38

Closed ryanprior closed 6 years ago

ryanprior commented 6 years ago

Summary

I can't figure out how to build my Inesita project as a static site. I think this is what inesita build is for, but that command doesn't appear to work.

Steps to reproduce

  1. install the gem: gem install inesita
  2. create a blank new project:

    bash-3.2$ inesita new test
         create  test
         create  test/.gitignore
         create  test/Gemfile
         create  test/README.md
         create  test/app/application.rb
         create  test/app/components/counter.rb
         create  test/app/components/description.rb
         create  test/app/components/home.rb
         create  test/app/components/navbar.rb
         create  test/app/index.html.slim
         create  test/app/router.rb
         create  test/app/store.rb
         create  test/app/stylesheet.css.sass
         create  test/config.ru
         create  test/static/inesita-rb.png
            run  bundle install from "./test"
    Fetching gem metadata from https://rubygems.org/...........
    Fetching gem metadata from https://rubygems.org/.
    Resolving dependencies...
    Using ast 2.4.0
    [...]
    Using inesita 0.7.0
    Fetching websocket 1.2.8
    Installing websocket 1.2.8
    Fetching inesita-livereload 0.1.0
    Installing inesita-livereload 0.1.0
    Fetching inesita-router 0.2.0
    Installing inesita-router 0.2.0
    [...]
    Bundle complete! 6 Gemfile dependencies, 31 gems now installed.
    Use `bundle info [gemname]` to see where a bundled gem is installed.
    Post-install message from sass:
    
    Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
    
    * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
     primary implementation: https://sass-lang.com/install
    
    * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
     sassc gem: https://github.com/sass/sassc-ruby#readme
    
    * For more details, please refer to the Sass blog:
     http://sass.logdown.com/posts/7081811
  3. attempt to build this project
    bash-3.2$ cd test
    bash-3.2$ inesita build

Expected result

The dist folder should now contain a static version of the default Inesita app.

Actual result

bash-3.2$ inesita build
      create  dist
      create  dist/static/inesita-rb.png
/usr/local/lib/ruby/gems/2.4.0/gems/inesita-0.7.0/lib/inesita/cli/build.rb:77:in `create_asset': undefined method `source' for nil:NilClass (NoMethodError)
    from /usr/local/lib/ruby/gems/2.4.0/gems/inesita-0.7.0/lib/inesita/cli/build.rb:46:in `build'
    from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    from /usr/local/lib/ruby/gems/2.4.0/gems/inesita-0.7.0/bin/inesita:5:in `<top (required)>'
    from /usr/local/bin/inesita:23:in `load'
    from /usr/local/bin/inesita:23:in `<main>'
fazibear commented 6 years ago

Hi, thanks for reporting, I found a bug and work on the fix. Will keep you updated.

fazibear commented 6 years ago

Hi again,

The problem was fixed, you need to update gem to inesita 0.8.1 generate new project and everything should work as you expect.

If you'll have any problems just let me know.

Cheers 🥃