Hi Jeremy,
The "hobo new" command executed the "rails new" command using a system
call. This is the code:
puts "Generating Rails infrastructure..."
system "rails new #{app_name} #{ARGV * ' '} -m #{template_path}"
This means that whatever Rails version has been installed last is used
the generate the empty app, to which Hobo laters adds a lot of
customisations. A simple workaround should be reinstalling rails 4.0.8
before creating a new Hobo app.
I can envision several ways of solving this for future users:
- Make Hobo check that "rails -v" returns a compatible version with the
installed version of Hobo. If not, print a helpful message like: "This
Hobo version requires Rails 4.0.x. Please install/reinstall Rails 4.0.8
with the folloring command and try again."
- Generate a small temporary Gemfile and use bundle exec to ensure we
are using the right version.
Any other suggestions?
Warm regards,
Ignacio
El 24/07/14 23:26, JezC escribió:
> Hi guys,
>
> I recently imploded my rvm installation, to use the widely recommended
> rbenv.
>
> It may be that I'm new to rbenv and haven't grasped it yet. But...
>
> I have some projects with rails 4.1.4. Some on 4.0.8. So I have both
> installed.
>
> That means that when I run 'hobo new', I get 4.1.4 installed, unless I
> kill rails 4.1.4 (e.g. delete the railties for 4.1.4).
>
> Now, with rvm, I could set up a gemset. That gemset restricted the
> exposure of 'hobo new' to just the rails versions that I want to use.
>
> I can't see any way to use rbenv, and multiple rails versions, without
> running the likelihood of being forced to use 4.1.4 for Hobo.
>
> We know that Hobo 2.1.1 won't work with Rails 4.1.x. So why is that
> being put into the Gemfile?
>
> Should there be some mechanism to limit the maximum, as well as the
> minimum revision. Somehow. Perhaps?
>
> And... have I misunderstood how to handle this issue with rbenv/bundler
> rather than rvm? Perhaps there is a way to make this work, and I'm just
> ignorant. :)
>
> Cheers, JeremyC.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.