LoadError issue with JRuby and NetBeans - ruby-on-rails

I am using netBeans with JRuby 1.5.1
I tried to install a gem but I got permission issues.
I solved it by changing user access.
Then I get this error [link] while trying to install gem again.
I installed JRuby 1.7.4 and could manage to install all gems there
Now the problem is when I run the project I get this error:
LoadError: no such file to load -- initializer
require at org/jruby/RubyKernel.java:1054

Related

Nokogiri won't load in production through Bundler

I'm running Ruby 2.2.3p173 on Ubuntu 15.10 with Capistrano for deployment. Deployment went off without a problem and bundled successfully but if I try to open the rails console, I get this with no additional information outside of the backtrace:
Error:
/home/anthony/apps/portal/shared/bundle/ruby/2.2.0/gems/nokogiri-1.6.7/lib/nokogiri.rb:29:in 'require': incompatible library version -`
/home/anthony/apps/portal/shared/bundle/ruby/2.2.0/gems/nokogiri-1.6.7/lib/nokogiri/nokogiri.so (LoadError)`
If I open irb, I can require 'nokogiri' and it works fine, but when I use bundler with Bundler.require, I get the same error.
I've tried uninstalling and reinstalling nokogiri and updating to the newest version. Also went through the advice in the official tutorial here.

could not find gem 'tzinfo-data (>=0) x86-mingw32' in the gems available on this machine. Run bundle install to install missing gems

I am new to ruby on rails development. Just started learning. I installed ruby on rails on my windows 8.1 pc with below packages kit from website.
I am using windows 8.1
Packages included are
Ruby 2.0.0
Rails 4.1
Bundler
Git
Sqlite
TinyTDS
SQL Server Support
DevKit
but when i try to run the server using command rails s i am getting below error.
could not find gem 'tzinfo-data (>=0) x86-mingw32' in the gems available on this machine.
Run bundle install to install missing gems
I tried to use bundle install command , but then i am getting below error
dl is deprecated please use fiddle
Please suggest
After so much research below are the steps you need to perform.
I am new on ruby on rails and faced so many issues during installation i dont want anyone to face this who are beginers to this
First install ssl_certificate into your ssl_certificate directory of railsinstller.
fire the command gem update --system
fire the command bundle install
install node.js os compitable installer

Rails installation on hostmonster bundle install fails

So I had a rails app up and working on my hostmonster account just fine. I then updated a few things in my dev environment / pushed them up to github / pulled them back down on my production environment. Now its giving me the error Could not find pg-0.17.1 in any of the sources (Bundler::GemNotFound).
This is a new gem i installed in my dev because i was attempting to move to postgresql for dev and live....for now im using postgresql in dev and mysql2 in production. I know this isn't optimal but im working on it.
I tried running bundle install to get the pg gem installed and it fails with the error
Gem::Exception: Cannot load gem at [/usr/lib64/ruby/gems/1.9.3/cache/rake-10.2.2.gem] in /home4/muscorei/workspace/vollapp
An error occurred while installing rake (10.2.2), and Bundler cannot continue.
Make sure that gem install rake -v '10.2.2' succeeds before bundling.
I try installing rake and it works fine...try again..same error. I have found one question on here that seems to fix this for others but it requires running of gem update --system which you cannot do for hostmonster. Any ideas?
So here is another "related" issue. When i type in gem list --local I see that rails is installed at version 4.1.0....however when i do rails -v it shows the systemwide version of 3.2.13. I don't EVER have any of these annoying issues on my dev environment.

Error with rails

Starting with rails and I had a problem with 'rails s' and the following error appears:
/usr/bin/ruby1.8: symbol lookup error: /var/lib/gems/1.8/gems/therubyracer-0.11.0beta5-x86_64-linux/lib/v8/init.so: undefined symbol: rb_intern2
You should consider updating to the latest version of Ruby and Rails (1.9.2 and 3.2.7, respectively). Also, you should make sure you have the latest version of the gem by running
gem uninstall therubyracer
gem install therubyracer
Note that servers such as WEBrick need to be restarted after installing gems; you can't just install the gem, include it in your code, and refresh the page like you can with new JS or CSS.
I'm having this issue but it seems that my local version requires the beta of therubyracer (to support libv8 as it throws a compile error without it on OS X 10.8), but my production system does not (CentOS).
I tried specifying group :production do in my bundle, but it throws an error saying i've called the gem twice. http://gembundler.com/rationale.html was what had me try that.

rubymine error - Could not find capybara-webkit-0.9.0 in any of the sources

When I try to run my application within rubyMine I get an error about capybara-webkit -
...
in `block in materialize':
Could not find capybara-webkit-0.9.0 in any of the sources (Bundler::GemNotFound)
But I don't get it when running the app via the command line.
Seems like rubyMine is checking all environments even when I run development and it has an issue with this gem for some reason.
my Gemfile includes:
...
group :test do
gem 'rspec-rails'
gem "capybara"
gem "capybara-webkit"
...
I am sharing a code base with another developer.
I use rubyMine, he doesn't.
We need capybara-webkit or similar for rspec tests.
Note:
Rails 3.1.3
Ruby 1.9.2-p290
I tried manually installing the gem from within rubyMine, gem manager, but still got error:
Following gems were not installed:
capybara-webkit (0.9.0): Error installing capybara-webkit:
ERROR: Failed to build gem native extension. /Users/durrantm/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb Gem files will remain installed in /Users/durrantm/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.9.0 for inspection. Results logged to /Users/durrantm/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.9.0/./gem_make.out
If you're using Mac OS X, then you need to make sure that you have installed all dependencies prior to installing Capybara WebKit. Please see the https://github.com/thoughtbot/capybara-webkit. Thus, you'll need to install Qt 4 Mac and you can get installation instructions here:
http://doc.qt.nokia.com/4.7-snapshot/install-mac.html
Also, you can install it through MacPorts by doing 'sudo port install qt4-mac'. Then you can install the capybara-webkit Ruby gem.

Resources