-
Notifications
You must be signed in to change notification settings - Fork 0
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
JRuby issue when running this project. #2
Comments
This project is not made for LibUI. It’s only for Glimmer DSL for SWT. I told you in your original ticket on Glimmer DSL for Web that Tetris is included in Glimmer DSL for LibUI. You don’t need this project for it. I don’t know why you don’t follow my instructions to the letter. Just follow them correctly and you shouldn’t get into trouble. In a 100% clean CRuby environment with no Tetris:
It's that simple. It works for everyone I know that follows the instructions correctly without mixing multiple projects together or adding unnecessary gems. |
Your gem install command mentions glimmer-dsl-swt which seems to indicate that you are not installing glimmer-dsl-LibUI in a clean Ruby gem set or environment. The two gems might conflict. They’re not designed to run together. I use RVM gemsets to avoid that. Or just start a clean Ruby environment and uninstall anything related to glimmer-dsl-swt and this Tetris from it. You’re didn’t follow my instructions from your original issue cleanly or else everything would have worked. I know of many people who got glimmer dsl LibUI working with no trouble. In a 100% clean CRuby environment with no Tetris:
It's that simple. It works for everyone I know that follow the instructions correctly without mixing multiple projects together or adding unnecessary projects. |
By the way, I worked at 3 different companies in the USA in the past that used JRuby. It’s not a niche technology. It is very popular at some Java shops given that Java is very popular too. Running a server for desktop apps is over engineering and in my opinion is very unintelligent. |
Going back to JRuby, you should try to get small JRuby programs running at first. Like try to run this program (hello_world.rb): puts 'hello world' By running:
It's always a good idea in software engineering to scale down your problem when you are into issues running a bigger program (like one with GUI). Can you even run that code above? |
This command makes no sense:
The way to use this Tetris from glimmer-dsl-swt is not like that at all. So, your issue is caused by user error. Just run this from JRuby:
Then run:
I don't know why you don't follow instructions (they're in the README) and complicate things for yourself. If you followed the instructions, it would have worked. Alternatively, you can clone the project. In that case, you can run bundle, but after you go into the project directory:
|
You totally are right, i use same RVM gemset for those two gem, I admit that I may have some bias against JRuby and lack patience(Because i not familiar with it)
This probably not true in China.
I try on a totally new JRuby environment, install gem succesful now. but still get some unexpected error when run thanks
|
it's odd that the gem name is I would uninstall and re-install as glimmer_tetris does run on my Ubuntu Linux with a different version of JRuby right now, but it has the wrong dimensions because some Linux distros calculate width and height in a weird way, so the app needs to be adjusted for them. It did have the right dimensions on an older version of Ubuntu Linux from what I remember. Either way, it should run at least. Regarding the error about this code: require 'bundler/setup' I believe this can be caused if you have a version of the Could you please look into the directory of your |
Actually, nevermind! the error for begin
require 'bundler/setup'
Bundler.require(:default)
rescue
require 'glimmer-dsl-swt'
require 'glimmer-cp-bevel'
end If it is not getting caught on your machine, that is weird. I would adjust |
OK, it seems you are having issues with the Either way, I will likely adjust that code in future versions of glimmer to |
I just made a new release of glimmer_tetris (version 1.0.2) that should fix this issue that you had (by adding I hope it resolves your issue. |
It works now. This is probably the first JRuby application I have ran.
I consider this is a over design of Ruby, many of my former colleagues were completely don't know StandardError, don't know rescue no exception only intercepts up to this level by default too, Crystal fix this. begin
File.read("foo")
rescue
puts "failed"
end
# Same as
begin
File.read("foo")
rescue Exception
puts "failed"
end
|
I'm glad you got it working (albeit with the dimensions issue I mentioned earlier). To fix the dimensions, clone the project repo locally, run bundle, and then edit the file body {
shell(:no_resize) {
grid_layout 2, false
text 'Glimmer Tetris'
minimum_size 500, 500 # replace with the dimensions that work best on your Linux For example, I am boosting to 1000, 1000 here: body {
shell(:no_resize) {
grid_layout 2, false
text 'Glimmer Tetris'
minimum_size 1000, 1000 Finally, run:
I hope that works for you. You can package a new gem for yourself by running:
It would generate under |
Moved from AndyObtiva/glimmer-dsl-web#4 (comment)
I am current running Arch Linux.
It get following error message when bundle install.
error report
--- ERROR REPORT TEMPLATE -------------------------------------------------------
Error Report
Questions
Please fill out answers to these questions, it'll help us figure out
why things are going wrong.
What did you do?
I ran the command
/home/zw963/.rvm/gems/jruby-9.2.19.0@glimmer_tetris/bin/bundle install
What did you expect to happen?
I expected Bundler to...
What happened instead?
Instead, what happened was...
Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?
I tried...
Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?
...
Backtrace
Environment
Bundler Build Metadata
Bundler settings
Gemfile
Gemfile
Gemfile.lock
--- TEMPLATE END ----------------------------------------------------------------
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=uninitialized+constant+Bundler++RubygemsIntegration++YamlLibrarySyntaxError&type=Issues
If there aren't any reports for this error yet, please copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md
Then, i switch to Ruby 3.3.4 with new rvmset
ruby-3.3.4@glimmer-dsl-libui
, and rangem install glimmer-dsl-libui
successful, but failed again when try to runglimmer examples
.install glimmer-dsl-libui logs
Anyway, I think JRuby is a niche thing in the Ruby world, in my decade of working with Ruby, I haven't even seen anyone use it, if we could run Tetris on a very small web server (e.g. Roda, Sinatra, even webrick), it would actually be easier to reproduce.
The text was updated successfully, but these errors were encountered: