Closed voobofdoom closed 10 years ago
Thanks a lot for your bug report, this is a very important bug if it's preventing you from creating a new app :S.
I have definitely tested it with Ruby 2.0 and Ubuntu 12.04, so some dependency must have broken. I will run the same test in a fresh virtual machine and see if I can reproduce it. I will come back to you as soon as possible.
By the way, I created a Vagrant machine to make it easy to try Hobo. If you want to give it a try you can go here: https://github.com/iox/vagranthobo.
Hi,
I have been able to reproduce this problem: it turns out that running "gem install hobo" will install rails 4.0.6.rc1. And apparently there's something broken between Hobo 2.1.0 and Rails 4.0.6.rc1. While we fix it, could you try this?
gem uninstall activesupport actionpack railties rails -v=4.0.6.rc1
gem install rails -v=4.0.5
hobo new mysuperapp --setup
I confirm that the quick fix above didn't help, guess a specific version is being required somewhere, since i get "Could not find proper version of railties (4.0.6.rc1) in any of the sources" when running hobo new.
I think i found a temporary fix for this affliction. Basically, good sir iox is correct, downgrade to rails 4.0.5 and everything starts working, however i couldn't downgrade within an already existing gemset, so:
rvm gemset create hobotest rvm gemset use hobotest gem install rails -v=4.0.5 gem install hobo hobo new mycoolapp --setup
Everything seems to work now. Thanks!
Cool, I'm glad the workaround works. The issue with "therubyracer" comes from Rails (but we've discussed adding it to the Gemfile ourselves). The official solution is to install "node" before creating the app.
Huh, I guess I have to open this one up again, it (the original error mentioned in the subject) also happens with 4.0.13 installed before...
stefan@mars:/var/rails$ hobo new hobo-demo
...
generate hobo:setup_wizard
/home/stefan/.rvm/gems/ruby-2.1.5/gems/hobo_support-2.1.0/lib/hobo_support/fixes/module.rb:14:in `alias_method': undefined method `create_record' for class `ActiveRecord::Associations::HasManyThroughAssociation' (NameError)
...
stefan@mars:/var/rails$ rails -v
Rails 4.0.13
I'll try the workarounds mentioned...
Ok, on my side the trouble maker was
gem "hobo", "= 2.1.0"
but exchanging it for
gem 'hobo', :git => 'https://github.com/Hobo/hobo.git'
solved the issue, so no need to reopen the issue.
tried with jruby-1.7.12, ruby-2.0.0, ruby-2.1.2, ruby-1.9.3 $ rvm use [ruby_version] $ rvm gemset create hobotry $ rvm use [ruby_version]@hobotry $ gem install hobo $ hobo new testapp expected output goes by..... and then this: [ruby_version]@hobotest/gems/hobo_support-2.1.0/lib/hobo_support/fixes/module.rb:14:in
alias_method': undefined method
create_record' for class `ActiveRecord::Associations::HasManyThroughAssociation' (NameError)trying to run rake -T will generate the same error.
please let me know if i can provide any other details. generally though, i grabbed a fresh ruby/gemset, installed hobo gem, tried to create a new app and failed with the above error, i reproduced it on 2 machines(debian 7, ubuntu 12.04).
Being a complete newcomer to hobo, i am not yet aquainted with the codebase and the way things are done, so i don't really understand the purpose of alias_method_chain...