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
Related
I have been trying to add the device gem in my rails app so I added
gem 'devise' to my gem file and i ran
bundle install
but when i'm trying to run
rails generate devise:install
I'm getting this error:
Could not find generator 'devise:install'. Maybe you meant 'assets', 'generator' or 'coffee:assets'
what should i do to make it install?
The better way to add gem is going to https://rubygems.org and search specify gem
for your situation you should add gem 'devise', '~> 4.7', '>= 4.7.1' to your Gemfile, then go back to console type bundle install
is it maybe just error you wrote "bunBle install", you should use 'bundle install' also check result after you run this command if everything is okay and run this command to be sure devise is installed 'gem list --local devise'
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.
Hi I am using rails 3 and ruby 1.9.3 and i am trying to install dynamic-spree-sitemaps with following code
script/extension install git://github.com/polomasta/dynamic-spree-sitemaps.git
mv vendor/extensions/dynamic-spree-sitemaps vendor/extensions/sitemaps
but it gives us
bash: script/extension: No such file or directory
please some one help me
I have not install this gem but script/extension install is old Rails 2.x command syntax. Instead do something like this.
In you Gemfile add:
gem 'dynamic-spree-sitemaps', :git => 'git://github.com/polomasta/dynamic-spree-sitemaps.git'
Or with https version:
gem 'dynamic-spree-sitemaps', :git => 'https://github.com/polomasta/dynamic-spree-sitemaps'
And run bundle install
Other way of installing directly from github source is by using a gem called specific_install
gem install specific_install
gem specific_install -l <url to a github gem>
In this case:
gem specific_install https://github.com/polomasta/dynamic-spree-sitemaps.git
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
Trying to reinstall RSpec, and I can't seem to re-add its command to my bin folder.
Mac-Users-MacBook-Pro:bin macuser$ rspec
-bash: /usr/bin/rspec: No such file or directory
>> which rspec
#> returns nothing.
I tried sudo gem install rspec --prerelease a dozen times, bundle install , and nothing seems to give.
What am I missing?
Hey Trip, I'm pretty sure the command is spec and not rspec.
Edit
Ok, so, I took another look, you are right the rspec command is included in rspec2...
So, here is a Gemfile I have which properly installs rspec w/ bundle install
source 'http://rubygems.org'
gem 'rails', '3.0.0'
gem 'mysql'
group :development, :test do
gem "rspec-rails", ">= 2.0.0.beta.17"
end
In my case, I'm using rvm & it is installed to:
/Users/me/.rvm/gems/ree-1.8.7-head#<my gemset>/bin/rspec
I went ahead and uninstalled all of rspec2.
Then instead of sudo gem install rspec --prerelease, I did sudo gem install rspec-rails --prerelease which worked.
Then I followed the explicit directions to delete certain files that were floating around in previous beta releases. Everything is copacetic.