Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

add Ruby on Rails 5 container #65

Merged
merged 5 commits into from
Jun 11, 2019
Merged

add Ruby on Rails 5 container #65

merged 5 commits into from
Jun 11, 2019

Conversation

ricefryegg
Copy link

Add a Ruby on Rails container with a test project.

@Chuxel
Copy link
Member

Chuxel commented Jun 7, 2019

@Amblizer Thanks for the contribution!!

Two things:

  1. The erb extension hasn't been touched since 2015 - Is it worth including?
  2. When I F5, I see two errors:

First this appears for bundleinstall in the terminal:

Attempting to uninstall minitest-5.9.0
Unable to uninstall minitest-5.9.0:
        Gem::InstallError: minitest is not installed in GEM_HOME, try:
        gem uninstall -i /usr/share/rubygems-integration/all minitest
Attempting to uninstall minitest-5.9.0
Unable to uninstall minitest-5.9.0:
        Gem::InstallError: minitest is not installed in GEM_HOME, try:
        gem uninstall -i /usr/share/rubygems-integration/all minitest
Clean Up Complete

The debug console then shows:

Uncaught exception: cannot load such file -- /workspaces/vscode-dev-containers/containers/ruby-2-rails-5/test-project/bin/rails
	/usr/local/bin/rdebug-ide:22:in `load'
	/usr/local/bin/rdebug-ide:22:in `<main>'
/var/lib/gems/2.3.0/gems/ruby-debug-ide-0.6.1/lib/ruby-debug-ide.rb:92:in `debug_load': cannot load such file -- /workspaces/vscode-dev-containers/containers/ruby-2-rails-5/test-project/bin/rails (LoadError)
	from /var/lib/gems/2.3.0/gems/ruby-debug-ide-0.6.1/lib/ruby-debug-ide.rb:92:in `debug_program'
	from /var/lib/gems/2.3.0/gems/ruby-debug-ide-0.6.1/bin/rdebug-ide:182:in `<top (required)>'
	from /usr/local/bin/rdebug-ide:22:in `load'
	from /usr/local/bin/rdebug-ide:22:in `<main>'

2. Fix bundle cleanup error
@ricefryegg
Copy link
Author

Hi @Chuxel, thank you so much for the feedback. I removed the outdated erb extension and fix the bundle errors. And I wasn't able to repeat the debugging error in stable(1.35.0) and insider(1.36.0) VS Cod, and my OS is Windows 10 17763.503. The debug console shows:

WARN: Unresolved specs during Gem::Specification.reset:
      rake (>= 0.8.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
=> Booting Puma
=> Rails 5.2.3 application starting in development 
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.3.3-p222), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:80
Use Ctrl-C to stop

Could you please rebuild the container and see if it still happens? The bundle install process could take some time because Rails requires a number of gems.

@Chuxel Chuxel self-requested a review June 7, 2019 14:08
@Chuxel
Copy link
Member

Chuxel commented Jun 7, 2019

@Amblizer Try deleting test-project/bin and then F5. I have no bin folder when I clone and build. Is there another step that needs to happen? I tried both on Windows and macOS at this point.

Another thing - I noticed you're setting an env var for the project location. The test-projects folder and .vscode folder won't be copied into another project, so you are better of hard coding the relative path in the launch.json and task.json. So, the env var won't be used.

2. add auto clean test-project after debug
3. hard coding relative path
@ricefryegg
Copy link
Author

@Chuxel Thank you for the quick reply. I find out the reason that test-project/bin folder missing is being ignored in .gitignore file, and it is now fixed by reconstructing locally. And I also hard-coded the relative path for the test-project.

@Chuxel
Copy link
Member

Chuxel commented Jun 10, 2019

Thank you for the quick reply. I find out the reason that test-project/bin folder missing is being ignored in .gitignore file, and it is now fixed by reconstructing locally. And I also hard-coded the relative path for the test-project.

@Chuxel Thanks! However, it looks like the test-project folder didn't get pushed. Was that intented?

@ricefryegg
Copy link
Author

@Chuxel Thanks for the reminder! The empty test-project folder gets ignored by Git and it will be reconstructed when initiating debugging. To eliminate ambiguousness, I add an empty .keep file so it is shown in the repository now.

@Chuxel
Copy link
Member

Chuxel commented Jun 11, 2019

LGTM!

@Chuxel Chuxel merged commit ce1f043 into microsoft:master Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants