The stellar-base library is the lowest-level stellar helper library. It consists of classes to read, write, hash, and sign the xdr structures that are used in stellar-core
Apache License 2.0
21
stars
19
forks
source link
Rspec error: `attribute': Stellar::Asset does not convert to xdr (ArgumentError) #26
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
stellar-base was resolved to 0.11.0, which depends on
xdr (~> 1.0.0) was resolved to 1.0.0, which depends on
activemodel (~> 4) was resolved to 4.2.7.1, which depends on
activesupport (= 4.2.7.1)
stellar-base was resolved to 0.11.0, which depends on
activesupport (~> 4)
stellar-base was resolved to 0.11.0, which depends on
activesupport (~> 4)
xdrgen was resolved to 0.0.1, which depends on
activesupport (~> 5)
change activesupport version of ruby-stellar-base to version 5 in ruby-stellar-base.gemspec
cd ..; git clone https://github.com/stellar/ruby-xdr
cd ruby-xdr
change activesupport and activemodel version for ruby-xdr from 4 to 5
run bundle
change to ruby-stellar-base folder and modify Gemfile to take local ruby-xdr and run bundle
run bundle exec rake and the following error shows:
ubuntu@me:~/sources/ruby-stellar-base$ bundle exec rake
/home/ubuntu/.rvm/rubies/ruby-2.2.6/bin/ruby -I/home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib:/home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-support-3.5.0/lib /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
Coverage report generated for RSpec to /home/ubuntu/sources/ruby-stellar-base/coverage. 218 / 297 LOC (73.4%) covered.
/home/ubuntu/sources/ruby-xdr/lib/xdr/dsl/struct.rb:5:in `attribute': Stellar::Asset does not convert to xdr (ArgumentError)
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/trust_line_entry.rb:35:in `<class:TrustLineEntry>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/trust_line_entry.rb:29:in `<module:Stellar>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/trust_line_entry.rb:28:in `<top (required)>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry/data.rb:32:in `<class:Data>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry/data.rb:23:in `<class:LedgerEntry>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry/data.rb:22:in `<module:Stellar>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry/data.rb:21:in `<top (required)>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry.rb:43:in `<class:LedgerEntry>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry.rb:36:in `<module:Stellar>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry.rb:35:in `<top (required)>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry_change.rb:30:in `<class:LedgerEntryChange>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry_change.rb:22:in `<module:Stellar>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar/ledger_entry_change.rb:21:in `<top (required)>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar-base-generated.rb:123:in `<module:Stellar>'
from /home/ubuntu/sources/ruby-stellar-base/generated/stellar-base-generated.rb:100:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require_with_backports'
from /home/ubuntu/sources/ruby-stellar-base/lib/stellar-base.rb:11:in `block in <top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/activesupport-5.0.1/lib/active_support/core_ext/kernel/reporting.rb:13:in `block in silence_warnings'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/activesupport-5.0.1/lib/active_support/core_ext/kernel/reporting.rb:26:in `with_warnings'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/activesupport-5.0.1/lib/active_support/core_ext/kernel/reporting.rb:13:in `silence_warnings'
from /home/ubuntu/sources/ruby-stellar-base/lib/stellar-base.rb:10:in `<top (required)>'
from /home/ubuntu/sources/ruby-stellar-base/spec/spec_helper.rb:8:in `require'
from /home/ubuntu/sources/ruby-stellar-base/spec/spec_helper.rb:8:in `<top (required)>'
from /home/ubuntu/sources/ruby-stellar-base/spec/lib/stellar/account_flags_spec.rb:1:in `require'
from /home/ubuntu/sources/ruby-stellar-base/spec/lib/stellar/account_flags_spec.rb:1:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1435:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1435:in `block in load_spec_files'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1433:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1433:in `load_spec_files'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:100:in `setup'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:86:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:71:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:45:in `invoke'
from /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/exe/rspec:4:in `<main>'
/home/ubuntu/.rvm/rubies/ruby-2.2.6/bin/ruby -I/home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/lib:/home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-support-3.5.0/lib /home/ubuntu/.rvm/gems/ruby-2.2.6/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
Steps to reproduce:
rvm install 2.2.6
,gem install bundler
git clone https://github.com/stellar/ruby-stellar-base
cd ruby-stellar-base
running
bundler
results in the following error:cd ..
;git clone https://github.com/stellar/ruby-xdr
cd ruby-xdr
bundle
bundle
bundle exec rake
and the following error shows: