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

How will we support Rails 2 and Rails 3 in the Commands and Snippets? #10

Open
drnic opened this issue Jan 26, 2010 · 6 comments
Open
Labels

Comments

@drnic
Copy link
Owner

drnic commented Jan 26, 2010

I think the migration of projects from Rails 2 to Rails 3 will be slow. Lots of people will want this textmate bundle to "work" appropriately for their current project.

We'll need away for the commands/snippets that exist on rails 2 & 3, but behave differently, to function.

Perhaps there won't be many of them anyway. For example, the rails 2 routing snippets (maprs, etc) aren't applicable in rails 3. New snippets will exist.

@DBA
Copy link

DBA commented Jan 30, 2010

As a user, when rails 3 officially comes out, I wouldn't mind this repository to migrate to rails 3 and another one to be created for rails 2, with some sort of "branching / fork" relationship between them.

This said, as a user, I would only find it natural if I had to download rails2-bundle for an older project.

Hope this user insight makes sense and helps, drnic.

@drnic
Copy link
Owner Author

drnic commented Mar 4, 2010

We could have three grammars: common "Ruby on Rails" (source.ruby.rails), with two edge cases per project: "Ruby on Rails 3" (source.ruby.rails.rails3) and "Ruby on Rails 2" (source.ruby.rails.rails2).

Then you'd pick Rails 3 or Rails 2 and only see the correct snippets. Ultimately it wouldn't matter about having separate tmbundles; it would be the grammar/syntax files.

@DBA
Copy link

DBA commented Mar 4, 2010

That would be an interesting approach that allows the maintenance of a single repo.

@barmstrong
Copy link

Simplest approach may be the best:

  1. create a fork or branch to maintain an old version for Rails 2.
  2. dive head first into moving master towards Rails 3, removing Rails 2 stuff where necessary

@jhaungs
Copy link

jhaungs commented Oct 29, 2010

When you use the new Rails 3 erb formats, e.g. <%= form_for %> (adding the = sign), you get a syntax error with Ctrl-Shift-V.

I figured out that the bundle uses /usr/bin/erb, and Rails 3 uses a different erb in its gem directory. This explains why TextMate sees a syntax error, and Rails 3 does not.

How can I get TextMate to use the Rails 3 erb instead of /usr/bin/erb ? It's not clear to me whether the new erb can be set up as a standalone shell command; it's used in Rails 3 via "require". And it's not clear that you can just replace /usr/bin/erb without all the extra erubis code being added to some path.

@ChuckJHardy
Copy link

It really would be great to get a resolution on this issue. Great Bundle, not used due to Rails 3 Issues.

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

No branches or pull requests

5 participants