Comments (23)
Answered on reddit as well. I had problems with an old version of rust. Try nightly from 9-17-2016 or stable.
from helix.
No. The owner of https://github.com/malept/thermite gave a good presentation at the seattle rust meetup about creating gems for his company to use and he plans to open source. sorry. I think you can close this issue now?
from helix.
I guess, it would be a rust package, and not a gem :-)
from helix.
https://crates.io/search?q=helix shows 0 results :-(
from helix.
Found out I can point to github, so that's handy: https://github.com/NullVoxPopuli/case_transform/blob/helix-rust-speed-boost/Cargo.toml#L12
from helix.
it looks like it's the helix_runtime that needs to be released as a gem :-)
from helix.
now it looks like I'm getting a similar error as I do when I try to run the fast_blank example:
now it looks like I'm getting a similar error as I do when I try to run the fast_blank example:
the error I get with turbo_blank:
$ rake
cargo build --release
gcc -Wl,-force_load,target/release/libturbo_blank.a --shared -Wl,-undefined,dynamic_lookup -o lib/turbo_blank/native.bundle
/home/me/OpenSource/helix/ruby/lib/helix_runtime.rb:2:in `require': cannot load such file -- helix_runtime/native (LoadError)
from /home/me/OpenSource/helix/ruby/lib/helix_runtime.rb:2:in `<top (required)>'
from /home/me/OpenSource/helix/examples/turbo_blank/lib/turbo_blank.rb:1:in `require'
from /home/me/OpenSource/helix/examples/turbo_blank/lib/turbo_blank.rb:1:in `<top (required)>'
from /home/me/OpenSource/helix/examples/turbo_blank/test/test_helper.rb:2:in `require'
from /home/me/OpenSource/helix/examples/turbo_blank/test/test_helper.rb:2:in `<top (required)>'
from /home/me/OpenSource/helix/examples/turbo_blank/test/turbo_blank_test.rb:1:in `require'
from /home/me/OpenSource/helix/examples/turbo_blank/test/turbo_blank_test.rb:1:in `<top (required)>'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:15:in `require'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:15:in `block in <main>'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:4:in `select'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -I"lib:test:lib" -I"/home/me/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib" "/home/me/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb" "test/turbo_blank_test.rb" ]
/home/me/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/home/me/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
my error:
$ rake
cargo build --release
gcc -Wl,-force_load,target/release/libcase_transform.a --shared -Wl,-undefined,dynamic_lookup -o lib/case_transform/native.bundle
gcc -Wl,-force_load,target/release/libcase_transform.a --shared -Wl,-undefined,dynamic_lookup -o lib/case_transform/native.bundle
/home/me/Development/case_transform/lib/case_transform.rb:8:in `require': cannot load such file -- case_transform/native (LoadError)
from /home/me/Development/case_transform/lib/case_transform.rb:8:in `<top (required)>'
from /home/me/Development/case_transform/test/test_helper.rb:9:in `require'
from /home/me/Development/case_transform/test/test_helper.rb:9:in `<top (required)>'
from /home/me/Development/case_transform/test/transforms/camel_lower_test.rb:3:in `require'
from /home/me/Development/case_transform/test/transforms/camel_lower_test.rb:2:in `<top (required)>'
from /home/me/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:15:in `require'
from /home/me/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:15:in `block in <main>'
from /home/me/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /home/me/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -w -I"lib:test:lib" -I"/home/me/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib" "/home/me/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/rake_test_loader.rb" "test/transforms/camel_lower_test.rb" "test/transforms/camel_test.rb" "test/transforms/dash_test.rb" "test/transforms/underscore_test.rb" ]
/home/me/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/me/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/home/me/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
from helix.
this is what I had previously:
cargo --version
cargo 0.12.0-nightly (6b98d1f 2016-07-04)
rustc --version
rustc 1.11.0 (9b21dcd6a 2016-08-15)
So old!
I also learned that I need to install rustup.rs to manage rust versions.
I ran rustup install nightly
and rustup default nightly
which gives version
1.13.0-nightly 2016-09-17 (the one you recommend)
After running rake
again, I still get the same error. :-(
I must me missing something in my environment.
from helix.
here is my full stack trace:
$ rake
cargo build --release
Compiling winapi-build v0.1.1
Compiling regex-syntax v0.3.5
Compiling libc v0.2.16
Compiling lazy_static v0.2.1
Compiling utf8-ranges v0.1.3
Compiling kernel32-sys v0.2.2
Compiling cslice v0.1.1 (https://github.com/rustbridge/neon#520d8abe)
Compiling winapi v0.2.8
Compiling memchr v0.1.11
Compiling libcruby-sys v0.1.0 (https://github.com/rustbridge/helix#2c057f04)
Compiling helix v0.1.0 (https://github.com/rustbridge/helix#2c057f04)
Compiling aho-corasick v0.5.3
Compiling thread-id v2.0.0
Compiling thread_local v0.2.7
Compiling regex v0.1.77
Compiling Inflector v0.3.1
Compiling case_transform v0.1.0 (file:///home/me/Development/case_transform)
warning: use of extern static requires unsafe function or block (error E0133), #[warn(safe_extern_statics)] on by default
--> src/lib.rs:15:1
|
15 | declare_types! {
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue 36247 <https://github.com/rust-lang/rust/issues/35112>
= note: this error originates in a macro from the standard library
warning: use of extern static requires unsafe function or block (error E0133), #[warn(safe_extern_statics)] on by default
--> src/lib.rs:15:1
|
15 | declare_types! {
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue 36247 <https://github.com/rust-lang/rust/issues/35112>
= note: this error originates in a macro from the standard library
warning: use of extern static requires unsafe function or block (error E0133), #[warn(safe_extern_statics)] on by default
--> src/lib.rs:15:1
|
15 | declare_types! {
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue 36247 <https://github.com/rust-lang/rust/issues/35112>
= note: this error originates in a macro from the standard library
warning: use of extern static requires unsafe function or block (error E0133), #[warn(safe_extern_statics)] on by default
--> src/lib.rs:15:1
|
15 | declare_types! {
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue 36247 <https://github.com/rust-lang/rust/issues/35112>
= note: this error originates in a macro from the standard library
note: link against the following native artifacts when linking against this static library
note: the order and any duplication can be significant on some platforms, and so may need to be preserved
note: library: util
note: library: dl
note: library: pthread
note: library: gcc_s
note: library: c
note: library: m
note: library: rt
note: library: util
Finished release [optimized] target(s) in 45.65 secs
gcc -Wl,-force_load,target/release/libcase_transform.a --shared -Wl,-undefined,dynamic_lookup -o lib/case_transform/native.bundle
gcc -Wl,-force_load,target/release/libcase_transform.a --shared -Wl,-undefined,dynamic_lookup -o lib/case_transform/native.bundle
/home/me/Development/case_transform/lib/case_transform.rb:8:in `require': cannot load such file -- case_transform/native (LoadError)
from /home/me/Development/case_transform/lib/case_transform.rb:8:in `<top (required)>'
from /home/me/Development/case_transform/test/test_helper.rb:9:in `require'
from /home/me/Development/case_transform/test/test_helper.rb:9:in `<top (required)>'
from /home/me/Development/case_transform/test/transforms/camel_lower_test.rb:2:in `require'
from /home/me/Development/case_transform/test/transforms/camel_lower_test.rb:2:in `<top (required)>'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:15:in `require'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:15:in `block in <main>'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /home/me/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -w -I"lib:test:lib" -I"/home/me/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib" "/home/me/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb" "test/transforms/camel_lower_test.rb" "test/transforms/camel_test.rb" "test/transforms/dash_test.rb" "test/transforms/underscore_test.rb" ]
/home/me/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/me/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/home/me/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
from helix.
oh wait! I missed a step!
from helix.
I'm still getting errors with helix_runtime. But now it at least says helix_runtime's extensions are not built... so that's progress
from helix.
my problem right now is that step 3 of the example in the readme says that it could not find a valid gem. :-\
So, I went into the gem directory and gem build helix_runtime.gemspec
it still isn't a valid gem apparently
from helix.
(because there is no pkg directory).
Maybe the readme needs to be updated? I changed step 3 to be: bundle exec gem install ../../ruby/helix_runtime-0.5.0.gem
and it installed
from helix.
the rake commands still give the error that extensions for helix_runtime are not built.
from helix.
Installing the helix_runtime gem:
$ gem install helix_runtime-0.5.0.gem
Building native extensions. This could take a while...
Successfully installed helix_runtime-0.5.0
Parsing documentation for helix_runtime-0.5.0
Done installing documentation for helix_runtime after 0 seconds
1 gem installed
no errors. :-\
from helix.
@sbeckeriv how exactly did you get this working?
from helix.
For fast blank I had to edit the gemspec but you found that post. I followed the readme with rust stable. I did also setup ruby per the ruru library instructions. I didn't think helix needed that but that could be the difference? Near the bottom https://github.com/d-unseductable/ruru/blob/master/README.md
I will post more of an output environment text blob when I can.
from helix.
I hadn't heard of ruru. Is that an alternative to Helix? or does it work with Helix?
from helix.
the readme is missing the build step for the gem I think.
My commands for your project from a mostly clean build:
https://gist.github.com/sbeckeriv/3671475129d11fef25af17a270150d6f
ruru and helix are like friends who have similar jobs and hang out at the same bar but don't really talk to each other.
I am not associated with either project. I am just excited for both of them.
from helix.
interesting. thanks for going through all that, I really appreciate it!
So, since getting a helix project working looks like it requires the helix repo, rather than a cargo package and rubygem, do you think it would be better to use ruru until helix is ready? It looks like Helix has slightly better apis? (maybe?) but ruru for sure looks more progressed.
from helix.
I think its always good to check out all options. I have only done some pet projects in both.
from helix.
have you released any gems in either?
from helix.
yeah. thanks!
from helix.
Related Issues (20)
- Classes require cloneable fields HOT 1
- Incorrect semicolon after class definition results in "Unknonw parser state" HOT 1
- Declaring lifetimes in Helix class structs? HOT 1
- Add Proc coercions
- Consider implicit coercions, e.g. `to_str` for String HOT 2
- Support for Rust's Generics
- Attempting to build a project when Rust isn't installed fails silently
- Unclear how to use rust based gems in other projects
- helix_runtime/libcruby-sys 1.0
- Forum or IRC channel HOT 2
- Coercions for Rust structs and Ruby hashes HOT 2
- Encoding error when requiring native.so HOT 4
- Activity Status HOT 4
- Re-try Changes in #148
- Investigate the safety of using `rb_raise`
- What is Helix doing that affects performance so much? HOT 9
- Getting symbol not found _HELIX_Qnil HOT 1
- warning: use of deprecated item 'try': use the `?` operator instead HOT 1
- Confusing example / importing Rust libs in Ruby/Rails
- undefined method `exists?' for File:Class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helix.