Ruby-Audio - "The specified module could not be found..." - ruby-on-rails

I've installed the ruby-audio-1.6.1 gem and I've added it to my Gemfile for my rails project however when trying to start up the server I'm getting:
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:in
require': 126: The specified module could not be found.
- C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/ruby-audio-1.6.1/rubyaudio_ext.so
(LoadError)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:in
rescue in '
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:1:in
<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:76:in
require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:76:in
block (2 levels) in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:72:in
each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:72:in
block in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:61:in
each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:61:in
require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler.rb:134:in
require'
from E:/Development/mixer/config/application.rb:7:in <top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in
require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in
block inserver'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in
tap'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in
server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in
run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in
<top (required)>'
from bin/rails:4:inrequire'
from bin/rails:4:in `'
I've been digging around and can't find much, I've ensured that libsndfile is installed correctly so the initial gem install went just fine, it's now just erroring out at this point. I've checked the file actually exists in that location and it does some I'm a bit stumped as to what could be going wrong.

In your Gemfile, try marking it as require false:
gem 'ruby-audio', require: false
Try starting the server, and post the results in your question.
You may also want to try a newer gem because the ruby-audio gem is quite old.
The sndfile gem is similar and newer: https://github.com/ronen/sndfile

Related

Evergreen load errors

I have a Rails 5 app and just added the following line to my Gemfile:
gem 'evergreen', require: 'evergreen/rails'
After that I run:
bundle
rake
And get the following issues:
Issue #1
Relevant output:
rake aborted!
LoadError: cannot load such file -- rack/showexceptions
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/sinatra-1.0/lib/sinatra/showexceptions.rb:1:in `<top (required)>'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/sinatra-1.0/lib/sinatra/base.rb:6:in `<top (required)>'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/evergreen-0.3.0/lib/evergreen.rb:2:in `<top (required)>'
I've 'fixed' this by using sinatra's master branch (currently at 2.0.0.beta2)
gem 'sinatra', git: 'https://github.com/sinatra/sinatra.git'
Issue #2:
Relevant output:
rake aborted!
LoadError: cannot load such file -- capybara/wait_until
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/evergreen-0.3.0/lib/evergreen.rb:4:in `<top (required)>'
Thing is wait_until has been removed from capybara.
Please note I'm not proceeding with evergreen actual usage just yet, all I want is to install it successfully for now. In other words, I want to be able to run rake without getting any errors.
Has someone else experienced the same issues? Is there anything I'm missing or should I just fork the gem and try to fix them?
From your error log you can see that you're project is using evergreen v0.3.0 (because its sinatra restriction was the last one that would allow 2+), whereas the current version of evergreen is v1.2.0 - You need to lock your version of evergreen in your Gemfile to >=1.2.0 and then see what other dependence issues you have.
You'll have at least a dependence issue with sinatra since the 1.2.0 version of evergreen requires sinatra ~> 1.1 whereas the current master branch allows >= 1.1. To use the master branch of evergreen in your project specify
gem 'evergreen', github: 'abepetrillo/evergreen', require: 'evergreen/rails'
in your Gemfile
Yes wait_until has removed with capybara2.0 check this updates. You should remove require "capybara/wait_until" for success.

Rails Server Sqlite LoadError

When trying to run rails server command from the command line I get the following error. The first line seems the most pertinent, as the ones that follow appear to be errors due to the LoadError. However, I'm not really sure.
J:\Github\rails\genepool>rails server
J:/Ruby21/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `each'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `block in require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `each'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler.rb:133:in `require'
from J:/Github/rails/genepool/config/application.rb:7:in `<top (required)>'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `tap'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `server'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have Sqlite3 installed to my Ruby root folder (Ruby21/sqlite). I've also got the Sqlite3 gem installed and the installation returns no errors. I can run sqlite from the command prompt. This is the same way I've got it installed on my laptop, which works fine so I'm really at a loss here. Any help appreciated.
This issue is resolved on this link. You basically have to change the require path from
s.require_paths=["lib"]
to
s.require_paths= ["lib/sqlite3_native"]
You can find it in your sqlite3 gemspec file. One example is /usr/local/share/gem/specifications/sqlite3-1.3.7.gemspec or 'C:\Ruby21\lib\ruby\gems\2.1.0\specifications'.

ruby tutorial to launch my app

i'm just starting with an Unix based OS
i installed RVM to do the same basic tutorial like windows(dos), but i get
an error, i tried to do the same work in root/user shell but is the same
when i run rails server i get this message:
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.1/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.1/lib/execjs.rb:5:in `<module:ExecJS>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.1/lib/execjs.rb:4:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.2.1/lib/uglifier.rb:3:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.2.1/lib/uglifier.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/raul/blog/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
i reviwed the gem command and dome problems was founded too. Execjs is installed several times in my machine, root->user. This is what i get with gem check:
json-1.8.0.gem has 12 problems
ext/json/ext/generator/.RUBYARCHDIR.time:
Extra file
ext/json/ext/generator/Makefile:
Extra file
ext/json/ext/generator/generator.o:
Extra file
ext/json/ext/generator/generator.so:
Extra file
ext/json/ext/generator/siteconf20130920-14093-1b8hzo9.rb:
Extra file
ext/json/ext/parser/.RUBYARCHDIR.time:
Extra file
ext/json/ext/parser/Makefile:
Extra file
ext/json/ext/parser/parser.o:
Extra file
ext/json/ext/parser/parser.so:
Extra file
ext/json/ext/parser/siteconf20130920-14093-zefm93.rb:
Extra file
lib/json/ext/generator.so:
Extra file
lib/json/ext/parser.so:
Extra file
Just add a JavaScript runtime to your Gemfile (for example, execJS): gem 'execjs'
Then, just run bundle install and it should work.
Install node
sudo apt-get install nodejs
followed by
gem install execjs
or just put gem 'execjs' in your gemfile.
EDIT: i'm editing my answer based on your edits and comments.

can't run rails server (activesupport error)

in my application, in the last few days, i'm unable to run the rails server/rails s or even bundle exec rails server command any more.
it was running like a charm before.
i tried to revert the changes using git, but no luck, i tried all the possible proprieties i could think of.
i use rubymine, but same problem when using the Terminal .
when i run:
ma#SL510:~/ts$ rails server
i get the following error stack trace :
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392#global/gems/unicorn-4.6.2/lib/unicorn/http_request.rb:4:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392#global/gems/unicorn-4.6.2/lib/unicorn.rb:103:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /home/ma/ts/config/application.rb:16:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
i don't know how could i fix this, to get the rails server command to run again !
any help would be appreciate it !
ps: please tell me if i need to provide more info. Thanks.
Thanks to Jef
creating a new gemset and using it
and after this:
gem install unicorn
fixed the problem with that command :)
You may try to create a brand new gemset (and use it), then bundle install so that Bundler install gems listed in your Gemfile. The stacktrace seems to indicate you're using the global gemset, which is a really bad idea.

problem on setting up ruby on rails

I just started learning ruby on rails with "Lynda Ruby on Rails 3 Essential Training".
I finished the installation, and created rails application by writing- "rails new app".
After that when I wrote - "rails server", that's what I saw:
C:\Users\Oded\sites\simple_cms>rails server
C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.r
b:2:in `require': 193: %1 is not a valid Win32 application. - C:/Ruby192/lib/r
uby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError
)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2.rb:7:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2.rb:7:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:64:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:64:in `block (2 levels) in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:62:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:62:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:51:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:51:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler.rb:11
2:in `require'
from C:/Users/Oded/sites/simple_cms/config/application.rb:7:in `<top (re
quired)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:28:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:28:in `block in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:27:in `tap'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Can you please help me find the solution?
Happy holidays,
Oded
Looks like you're missing some gems! try running bundle install... then all should work.
EDIT: make sure that your Gemfile contains the line
gem 'mysql'
before running bundle install. Bundler will get you set up for mysql, dependencies and all.
You have to go to this website and follow the directions ...
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
or in short download the connector mentioned in the article from mysql or a mirror site
Run this command:
gem install mysql --platform=ruby -- --with-mysql-dir=C:/mysql-connector-c-noinstall-6.0.2-win32
Make sure you have the correct path to the mysql connector folder that has no spaces!!
After that is complete make sure you copy the libmysql.dll file from the connector library you unzipped and downloaded and placed that in the Ruby\bin file.
After that delete the connector libary and start it up by typing 'rails server' making sure your gem file has the line gem 'mysql' or gem 'mysql2' I'm not sure which one so try both. It sucks and they really need to fix this for windows.

Resources