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

There is NoMethodError encode': undefined method force_encoding' while running through terminal #18

Open
CuriousNikhil opened this issue Nov 13, 2017 · 5 comments

Comments

@CuriousNikhil
Copy link

CuriousNikhil commented Nov 13, 2017

The terminal error logs are:

/var/lib/gems/1.8/gems/osc-ruby-1.1.1/lib/osc-ruby/osc_types.rb:21:in encode': undefined method force_encoding' for "/run-code\000\000\000":String (NoMethodError)
from /var/lib/gems/1.8/gems/osc-ruby-1.1.1/lib/osc-ruby/message.rb:31:in encode' from /var/lib/gems/1.8/gems/osc-ruby-1.1.1/lib/osc-ruby/client.rb:10:in send'
from /var/lib/gems/1.8/gems/sonic-pi-cli-0.1.1/lib/sonic_pi.rb:39:in send_command' from /var/lib/gems/1.8/gems/sonic-pi-cli-0.1.1/lib/sonic_pi.rb:14:in run'
from /var/lib/gems/1.8/gems/sonic-pi-cli-0.1.1/bin/sonic_pi:58:in run' from /var/lib/gems/1.8/gems/sonic-pi-cli-0.1.1/bin/sonic_pi:62 from /usr/local/bin/sonic_pi:23:in load'
from /usr/local/bin/sonic_pi:23

@rbnpi
Copy link
Contributor

rbnpi commented Nov 13, 2017

I think this is an error from Sonic Pi because you used run-code instead of run_code (See the syntax in the Help File Lang section for Sonic Pi)

@CuriousNikhil
Copy link
Author

No sir. I'm just using sonic-pi-cli and i am just placing this command sonic_pi play 50 in the terminal. My terminal window is showing the above error.

@rbnpi
Copy link
Contributor

rbnpi commented Nov 13, 2017

OK: sorry. What platform are you running on? what version of Sonic Pi? What version of ruby do you have installed?
what does gem list give as output? does it show osc-ruby (xxx)

@CuriousNikhil
Copy link
Author

CuriousNikhil commented Nov 14, 2017

I am running sonic-pi on RaspberryPi with latest version of 2.10
the output of gem-list is:

*** LOCAL GEMS ***

osc-ruby (1.1.1)
sonic-pi-cli (0.1.1)

@Widdershin
Copy link
Owner

Am I right in thinking that you're running a relatively old version of Ruby (1.8)? Would you be able to try again with a newer version?

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

No branches or pull requests

3 participants