Issue with bundle install in CentOs machine - ruby-on-rails

I am getting the following error while running bundle install in CentOs machine.I am getting this issuw with i18n gem.
System.java: -2:in 'arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in 'makeTIme'
from DefaultResolver.java:277:in 'create'
from DefaultResolver.java:317:in 'handleScalar'
from DefaultResolver.java:435:in 'orgHandler'
I didn't get this issue with Windows Machine, I am getting this error only with CentOS.
I have the following code in gemfile.
source 'http://rubygems.org'
gem 'rails', '3.2.13'
gem "i18n","=0.6.1"
gem "activeresource","=3.2.13"
gem "activesupport","=3.2.13"
gem "multi_json","=1.0.3"
Could you please help us on this?

It looks like this was an issue in JRuby that has since been fixed: http://jira.codehaus.org/browse/JRUBY-5806

Related

Add Gem 'wdm' to your GemFile

Error
I have tried running the following command in git bash
rails g scaffold_controller oragnizationsController
And I get the error in the picture.
I have tried multiple solutions:
1- Tried running
gem install wdm
2- Tried running
bundle install
3- I have tried adding
gem 'wdm', '~> 0.1.0'
and
gem 'wdm', '~> 0.1.1'
since I read that 0.1.0 ain't working anymore.
But the problem hasn't been solved yet. I am using windows 10, ruby 2.3.3, rails 5.1.4
Uninstall wdm gem and put it to the gemfile like this:
gem 'wdm' if Gem.win_platform?
Or like the error tells you
The message about wdm is misleading here. It seems to be just a notice/warning.
If you look closer, you'll see that the actual error message is printed in the line below that. It says:
cannot load such file -- bcrypt_ext (LoadError)
Then see here: Ruby on windows causes error Cannot load such file bcrypt_ext

My "rails server" command not working properly and terminating unexpectedly

Whenever i run my rails server command on my command prompt it gives me the following error:
Since i am new to the Rails, I don't know much about it.
Guide me with the solution if possible..
I am using rails 5 on windows OS
Specified 'mysql2' for database adapter, but the gem is not loaded. Add gem 'mysql2' to your Gemfile
As your error says please add mysql2 in your Gemfile
# Gemfile
gem 'mysql2'
Also make sure you have mysql installed
The answer to your question is in the error message. You're using mysql2 as your database adaptor, but the gem isn't available.
add:
gem 'mysql2'
to your gemfile, then run bundle update from your project folder to install the missing gem.
You need to add
gem 'mysql'
in your Gemfile.
If its added then run command bundle install to install it. And check whether its installed successfully or not then restart server.
Also check your gem version with your Rails version.

Devise Invitable - Could not find generator 'devise_invitable:install'

I'm trying to setup scambra devise_invitable in my rails 5 project. After setting up the gem and bundle install, When I run the first command for the initial setup -
rails generate devise_invitable:install I get the following error.
Expected boolean default value for '--markerb'; got :erb (string)
Could not find generator 'devise_invitable:install'.
Maybe you meant 'devise:install', 'annotate:install' or 'responders:install'
This is my gemfile.
gem 'devise', github: 'plataformatec/devise', branch: 'master'
gem 'devise_invitable', '~> 1.7.2'
How do I fix this?
Okay. I restarted my laptop and it worked. Weird. Solution suggested from github found here. https://github.com/scambra/devise_invitable/issues/579
I tried with restarting and not worked in my case ruby 2.5.1 rails 5.2.3 dell xps ubuntu 18.04.
What worked is:
bundle exec gem install devise_invitable
then I saw that it installed version:
Successfully installed devise_invitable-2.0.1
Parsing documentation for devise_invitable-2.0.1
Done installing documentation for devise_invitable after 0 seconds
1 gem installed
so I updated Gemfile line to correct version:
gem 'devise_invitable', '~> 2.0.1'
and then run rails generate devise_invitable user successfully!

Error when installing devise- i am a novice

I have installed rails and am running Git Bash and am on Windows 7 64 bit, i have installed gemfile and updated and this is my first use of ruby! I am following the instrustions from devise's github: https://github.com/plataformatec/devise . I am probably being very stupid but when i run gem 'devise' and this error occurs:
ERROR: while executing gem... <Gem::commandlinerror> unknown command /devise
Any help would be greatly appreciated
i think you are not installing gem properly.
gem install command is gem install devise
or perhaps you should add the gem to your Gemfile like this
gem "devise"
and then run this command in your terminal
bundle install
If you are running gem 'devise' then it won't work because its not a valid command.
You should give
gem install devise
or
Include gem 'devise' in Gemfile and run bundle install

Unable to install Doorkeeper-MongoDB

I have a fresh installation of rails 4 with MongoMapper. Now i'm trying to install doorkeeper on my rails instance.
I added the "gem 'doorkeeper-mongodb'" line in my Gemfile. Then I ran 'bundle install'. And I got the following error :
Could not find gem 'doorkeeper-mongodb (>= 0) ruby' in any of the gem sources listed in your Gemfile or available on this machine.
Also, I tried to install it using the gem install command but it doesn't work either.
I'm on Mac OS X.
The line to put in the Gemfile is
gem 'doorkeeper-mongodb', github: 'doorkeeper-gem/doorkeeper-mongodb'
I tried checking the gems in https://rubygems.org and could not find doorkeeper-mongodb.
And then googled out, and found that if you want to install gems from github source, then the right way seems like this following:
gem 'doorkeeper-mongodb', :git => 'git://github.com/doorkeeper-gem/doorkeeper-mongodb.git'
Or you can also download the source from github, and install it from local.

Resources