Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.use seems to be broken #28

Open
reuven opened this issue Jul 5, 2014 · 8 comments
Open

config.use seems to be broken #28

reuven opened this issue Jul 5, 2014 · 8 comments

Comments

@reuven
Copy link
Contributor

reuven commented Jul 5, 2014

I'm using Ruby 2.1.2. I cloned the Git repository, and copied the examples/orgmode-basic directory to its own directory, to avoid the overall quarto Rakefile from affecting the book's Rakefile. I then typed

rake -T

and got the following:

$ rake -T
rake aborted!
NoMethodError: undefined method `use' for Quarto:Module
/Users/reuven/Downloads/orgmode-basic/Rakefile:4:in `block in <top (required)>'
/Users/reuven/.rvm/gems/ruby-2.1.2/gems/quarto-0.0.1/lib/quarto.rb:11:in `configure'
/Users/reuven/Downloads/orgmode-basic/Rakefile:3:in `<top (required)>'
/Users/reuven/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/reuven/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

I got the same result with Ruby 1.9.3. Any suggestions?

@avdi
Copy link
Owner

avdi commented Jul 17, 2014

That's super weird. Uh... try setting up a Gemfile, maybe?

@reuven
Copy link
Contributor Author

reuven commented Jul 19, 2014

Nope, that didn't seem to help.

I created a Gemfile whose contents were:

gem 'rake'
gem 'quarto'

I then did a "bundle install" and then ran "rake -T", and got the following:

$ rake -T
rake aborted!
NoMethodError: undefined method `use' for Quarto:Module
/Users/reuven/Downloads/orgmode-basic/Rakefile:4:in `block in <top (required)>'
/Users/reuven/.rvm/gems/ruby-2.1.2/gems/quarto-0.0.1/lib/quarto.rb:11:in `configure'
/Users/reuven/Downloads/orgmode-basic/Rakefile:3:in `<top (required)>'
/Users/reuven/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/reuven/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

Any further ideas?

@avdi
Copy link
Owner

avdi commented Jul 20, 2014

You're sourcing Quarto from your local git repo, right? Not from Rubygems?

On Sat, Jul 19, 2014 at 5:31 PM, Reuven M. Lerner [email protected]
wrote:

Nope, that didn't seem to help.

I created a Gemfile whose contents were:

gem 'rake'
gem 'quarto'

I then did a "bundle install" and then ran "rake -T", and got the
following:

$ rake -T
rake aborted!
NoMethodError: undefined method use' for Quarto:Module /Users/reuven/Downloads/orgmode-basic/Rakefile:4:inblock in <top (required)>'
/Users/reuven/.rvm/gems/ruby-2.1.2/gems/quarto-0.0.1/lib/quarto.rb:11:in configure' /Users/reuven/Downloads/orgmode-basic/Rakefile:3:in<top (required)>'
/Users/reuven/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in eval' /Users/reuven/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in

'
(See full trace by running task with --trace)

Any further ideas?


Reply to this email directly or view it on GitHub
#28 (comment).

Avdi Grimm
http://avdi.org

@reuven
Copy link
Contributor Author

reuven commented Jul 20, 2014

No.... did I miss something important in the instructions?

(That is, I'm doing a "gem install quarto" on my system, and then I'm doing "bundle install" with that Gemfile.)

@avdi
Copy link
Owner

avdi commented Jul 20, 2014

Quarto is under extremely active development, stuff you see in the current
README on Github isn't going to correspond to the last gem that was pushed.
At the very least you'll need to source it from Github in your gemfile,
rather than from rubygems.

On Sun, Jul 20, 2014 at 2:29 PM, Reuven M. Lerner [email protected]
wrote:

No.... did I miss something important in the instructions?


Reply to this email directly or view it on GitHub
#28 (comment).

Avdi Grimm
http://avdi.org

@reuven
Copy link
Contributor Author

reuven commented Jul 20, 2014

OK, I managed to get things to work:

(1) I forked quarto (although I'm not sure that was really an important step here)
(2) I copied the orgmode example into a new directory
(3) I created a Gemfile containing two "gem" lines (for rake and my GitHub fork of quarto)
(4) I did a "bundle install"
(5) I removed the testing-only line that is in the orgmode example, which looks for VENDOR_ORG_MODE_DIR
(6) I ran "rake -T"

Voila! Success. At least for this basic stuff. Next up, trying to actually get it to work with org-mode...

I'd be happy to submit a pull request to update the README, either to help others succeed with this as I did, and/or to warn people away from believing the README, since the code is under such active development.

Thanks again for the code and responses!

@avdi
Copy link
Owner

avdi commented Jul 20, 2014

Re README PR: PLEASE PLEASE PLEASE :-) :-) :-)

There's already a bit of a disclaimer in there, but there should probably
also be a big red flag about the gems being way the hell out of date.

On Sun, Jul 20, 2014 at 3:15 PM, Reuven M. Lerner [email protected]
wrote:

OK, I managed to get things to work:

(1) I forked quarto (although I'm not sure that was really an important
step here)
(2) I copied the orgmode example into a new directory
(3) I created a Gemfile containing two "gem" lines (for rake and my GitHub
fork of quarto)
(4) I did a "bundle install"
(5) I removed the testing-only line that is in the orgmode example, which
looks for VENDOR_ORG_MODE_DIR
(6) I ran "rake -T"

Voila! Success. At least for this basic stuff. Next up, trying to actually
get it to work with org-mode...

I'd be happy to submit a pull request to update the README, either to help
others succeed with this as I did, and/or to warn people away from
believing the README, since the code is under such active development.

Thanks again for the code and responses!


Reply to this email directly or view it on GitHub
#28 (comment).

Avdi Grimm
http://avdi.org

@jschoolcraft
Copy link

I'm late to the party but I can reproduce both of the config issues:

Gemfile:

  source 'https://rubygems.org'

  gem 'rake'
  gem 'quarto', github: 'avdi/quarto'

It's pointing to the latest commit on master:

  bundle show quarto
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/quarto-28de735c7b07

Error:

  rake aborted!
  NoMethodError: undefined method `author=' for Quarto:Module
  /Users/jschoolcraft/code/therobotcoach/vex-tutorial/Rakefile:4:in `block in <top (required)>'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/quarto-0.0.1/lib/quarto.rb:11:in `configure'
  /Users/jschoolcraft/code/therobotcoach/vex-tutorial/Rakefile:3:in `<top (required)>'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/bin/rake:23:in `load'
  /Users/jschoolcraft/.rbenv/versions/2.1.2/bin/rake:23:in `<main>'

Same with use, e.g.:

  require 'quarto'

  Quarto.configure do |config|
    # config.author              = "Jeff Schoolcraft"
    # config.title               = "VEX ROBOTC Tutorial"

    config.use :markdown      # if you want to use markdown
  end

rake -T output:

  rake aborted!
  NoMethodError: undefined method `use' for Quarto:Module
  /Users/jschoolcraft/code/therobotcoach/vex-tutorial/Rakefile:7:in `block in <top (required)>'
  /Users/jschoolcraft/code/therobotcoach/vex-tutorial/Rakefile:3:in `<top (required)>'
  (See full trace by running task with --trace)

Even the default task isn't set (says rake deliverables should be it in the README)

  ~/c/t/vex-tutorial ❯❯❯ rake
  rake aborted!
  Don't know how to build task 'default'

  (See full trace by running task with --trace)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants