Bundle install is not working on shared hosting , but i installed gem bundle , when i ran the following command
i tried
bundle install
-jailshell: bundle: command not found
so i try to evaluate the following commands
gem list bundler -v 1.1.4
*** REMOTE GEMS ***
bundler (1.1.4)
bundler-auto-update (0.0.4)
bundler-bootstrap (0.0.3)
bundler-bouncer (0.1.2)
bundler-fastupdate (0.0.3)
bundler-github (0.2.0)
bundler-maglev- (1.0.21)
bundler-talks (0.0.4)
bundler08 (0.8.5)
bundler_bash_completion (0.1.1)
bundler_geminabox (0.0.1)
bundler_local_development (0.3.0)
bundler_push_host (0.0.1)
bundler_timer (1.1.2)
bundler has installed , but i don't know why its not working?
when i ran
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/username/ruby/gems
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /home/username/ruby/gems/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/username/ruby/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gempath" => []
- "gem" => "--remote --gen-rdoc --run-tests"
- "gemhome" => "/home/username/ruby/gems"
- "rdoc" => "--inline-source --line-numbers"
- REMOTE SOURCES:
- http://rubygems.org/
echo $PATH
/usr/local/jdk/bin:/home/username/perl5/bin:/usr/kerberos/bin:/usr/lib/courier-imap/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/username/bin
uname -mrsn
Linux osprey.arvixe.com 2.6.18-374.3.1.el5.lve0.8.44 x86_64
more /proc/version
Linux version 2.6.18-374.3.1.el5.lve0.8.44 (mockbuild#buildfarm.cloudlinux.com)
(gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Mon Oct 3 18:27:54 EEST 2
011
which gem
/usr/bin/gem
which ruby
/usr/bin/ruby
which rails
/usr/bin/rails
ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
rails -v
Rails 2.3.14
gem -v
1.8.15
locate bundle
locate: can not open `/var/lib/mlocate/mlocate.db': Permission denied
Guys Please help me basic bundle install command is not working , so i don't know what todo and also i am new to ruby on rails.
I solved my problem, hosting guys need to give some permissions.
you always need to install gems on our home directory particularly in shared hosting
bundle install --path /home/username/bundle
Related
I've a Rails app that needs to use bundler version
gem "bundler", ">= 2.2.17", "<= 2.2.30"
I've installed bundler version 2.2.30 using gem install bundler:2.2.30 --default. Running gem list bundler returns the following
*** LOCAL GEMS ***
bundler (default: 2.2.30)
but the issue is that bundler version returns a different version(2.1.2) than 2.2.30. It returns
Bundler version 2.1.2
which bundler gives
/Users/masroor/.rbenv/shims/bundler
and whenever I try to bundle the app using bundle _2.2.30_ install or try running rails server/console, it does not pick up the right bundler version(2.2.30) instead it uses 2.1.2
Trying to do bundle _2.2.30_ install fails with this error
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (>= 2.2.17, <= 2.2.30)
Current Bundler version:
bundler (2.1.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running gem install bundler?
Could not find gem 'bundler (>= 2.2.17, <= 2.2.30)' in any of the relevant sources:
the local ruby installation
The gem env installation path does not contain the bundler gemspec against 2.1.2 bundler version.
Output of gem env
RubyGems Environment:
- RUBYGEMS VERSION: 3.1.2
- RUBY VERSION: 2.7.0 (2019-12-25 patchlevel 0) [x86_64-darwin19]
- INSTALLATION DIRECTORY: /Users/masroor/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0
- USER INSTALLATION DIRECTORY: /Users/masroor/.gem/ruby/2.7.0
- RUBY EXECUTABLE: /Users/masroor/.rbenv/versions/2.7.0/bin/ruby
- GIT EXECUTABLE: /usr/local/bin/git
- EXECUTABLE DIRECTORY: /Users/masroor/.rbenv/versions/2.7.0/bin
- SPEC CACHE DIRECTORY: /Users/masroor/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/masroor/.rbenv/versions/2.7.0/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-19
- GEM PATHS:
- /Users/masroor/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0
- /Users/masroor/.gem/ruby/2.7.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/masroor/.rbenv/versions/2.7.0/bin
- /usr/local/Cellar/rbenv/1.2.0/libexec
- /usr/local/opt/mysql#5.7/bin
- /Users/masroor/.rbenv/shims
- /Users/masroor/.nvm/versions/node/v10.16.3/bin
- /usr/local/opt/mysql#5.7/bin
- /Users/masroor/.rbenv/shims
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /Library/Apple/usr/bin
- /Library/Apple/bin
The installed gemspecs for bundler, returned by ls /Users/masroor/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/specifications/default/ | grep bundler are
bundler-2.2.30.gemspec
I'm using rbenv for ruby version management, running ruby -v returns
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
which ruby returns
/Users/masroor/.rbenv/shims/ruby
I tried to find files pertaining to bundler 2.1.2 in my filesystem with
find / -type f -name bundler | grep bundler | grep 2.1.2
and found the following
/System/Volumes/Data/Users/masroor/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundler
/Users/masroor/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundler
when I try to uninstall bundler version 2.1.2 with gem uninstall bundler:2.1.2 I get
Gem 'bundler' is not installed
I study linux for 1 month. While I tried to make all steps from Migrating from MySQL to Postgres on Heroku I've got an error I could not handle.
When I try to install the mysqltopostgres gem from source:
$ git clone https://github.com/maxlapshin/mysql2postgres.git
$ cd mysql2postgres
$ bundle install
$ gem build mysqltopostgres.gemspec
$ sudo gem install mysqltopostgres-0.2.20.gem
I have an error on $ bundle install :
/home/franchb/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
from /home/franchb/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:55:in `require'
from /usr/bin/bundle:7:in `<main>'
I've installed sudo apt-get install bundler but when i try enter bundle -v I get the same error!
My gem env is:
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.0 (2015-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/franchb/.rvm/gems/ruby-2.3.0#global
- USER INSTALLATION DIRECTORY: /home/franchb/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /home/franchb/.rvm/rubies/ruby-2.3.0/bin/ruby
- EXECUTABLE DIRECTORY: /home/franchb/.rvm/gems/ruby-2.3.0#global/bin
- SPEC CACHE DIRECTORY: /home/franchb/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /home/franchb/.rvm/rubies/ruby-2.3.0/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/franchb/.rvm/gems/ruby-2.3.0#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/franchb/.rvm/gems/ruby-2.3.0#global/bin
- /home/franchb/.rvm/rubies/ruby-2.3.0/bin
- /home/franchb/.rvm/bin
- /home/franchb/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
My rvm gemset list is
gemsets for ruby-2.3.0 (found in /home/franchb/.rvm/gems/ruby-2.3.0)
(default)
=> global
rails230
My gem list is
*** LOCAL GEMS ***
bigdecimal (1.2.8)
bundler-unload (1.0.2)
did_you_mean (1.0.0)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
io-console (0.4.5)
json (1.8.3)
minitest (5.8.3)
net-telnet (0.1.1)
power_assert (0.2.6)
psych (2.0.17)
rake (10.4.2)
rdoc (4.2.1)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
test-unit (3.1.5)
I use Linux Mint 17.3
Please, help me to understand what goes wrong. I need to install mysqltopostgres to migrate MySQL to Posgres in Heroku.
Thank you!
1) Skip the sudo just run gem install bundler
2) run bundle install
Now it should work
I have an issue with a "missing gem".
After executing rake gems:install
>> rake gems:install
(in /some/path)
gem install google-api-client --version "= 0.7.1"
Successfully installed uuidtools-2.1.5
Successfully installed google-api-client-0.7.1
2 gems installed
Installing ri documentation for uuidtools-2.1.5...
Installing ri documentation for google-api-client-0.7.1...
Installing RDoc documentation for uuidtools-2.1.5...
Installing RDoc documentation for google-api-client-0.7.1...
Where we can see with a gem list the presence of the gem
>> gem list | grep google
google-api-client (0.7.1)
When starting my rail app I get a :
Missing these required gems:
google-api-client
You're running:
ruby 1.8.7.302 at /usr/bin/ruby1.8
rubygems 1.3.7 at /some/path/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
and then Rails advices me to execute a "rake gems:install" to solve the issue..
I only have a single version of ruby installed : ruby 1.8.7-p302
>> which ruby
/usr/bin/ruby
>> ls -l /usr/bin/ruby
lrwxrwxrwx 1 root root 7 Aug 26 2013 /usr/bin/ruby -> ruby1.8
>> ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
>> gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I don't know where does the issue come from.
(Similarly, if I just make a ruby test file
require "rubygems"
require "google-api-client"
It outputs the same error :
>> ruby test.rb
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- google-api-client (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from test.rb:2
)
EDIT : I don't use bundle on this app.
Do you have some clue to solve this ?
Thanks !
Well, it was just the require that was erroneous
require "google/api_client"
instead of
require "google-api-client"
Thanks for the help.
You will update bundle version and then update gem.
I'm trying to figure out this eclipse aptana plugin (coming from a visual studio background). When I try to debug my project as follows:
It throws this error:
Unable to find 'rdebug-ide' binary script. May need to install 'ruby-debug-ide' gem, or may need to add your gem executable directory to your PATH (check location via 'gem environment').
This is gem environment:
RubyGems Environment:
- RUBYGEMS VERSION: 1.5.2
- RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby192/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/Ruby192/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby192/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby192/lib/ruby/gems/1.9.1
- C:/Users/Lol/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
The server can be started, I can go to localhost:3000 and it loads. But I dont understand this error or how to get debugging started. Any idea what is wrong?
PS. Coming from an asp.net mvc background, I can right click controllers folder and add controller. Then right click an action and generate a view for it. Can I not do this in ruby on rails development?
Issue the following command from the command line:
gem install ruby-debug-ide
The error message is saying that you don't have this gem installed. It seems as though Aptana does not check to see what gems are installed before activating certain features.
In case you don't know what a gem is, think of it as a plugin that is installed system-wide.
Take a look at this post for installing ruby debug for ruby 1.9.3
I was having the same problem as Mel Padden in osX. With the gem already installed it threw me the same error(I have rvm installed).What I did it was make a symbolic link to aptana and after that invoke it from console.
$ ln -s /Applications/Aptana\ Studio\ 3/AptanaStudio3.app/Contents/MacOS/AptanaStudio3 /usr/local/bin/aptana
$ aptana&
Is not the best solution, but it works :)
I'm also having this problem on 64-bit Ubuntu.
Not only can I not debug, now when I open the IDE it gives strange UI errors. The package explorer won't display and dialogs keep popping up.
Here's the listing I get from my Rails install
Installing RDoc documentation for ruby-debug-ide-0.4.16...
mel#ubuntu:/usr/share/eclipse/features$ gem list
*** LOCAL GEMS ***
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.4)
fastthread (1.0.7)
gem_plugin (0.2.3)
linecache (0.46)
mongrel (1.1.5)
rake (0.9.2)
rbx-require-relative (0.0.5)
ruby-debug-base (0.10.4)
ruby-debug-ide (0.4.16)
ruby-mysql (2.9.4)
mel#ubuntu:/usr/share/eclipse/features$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/mel/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
My rails application is working well under my user:
$ rails server
=> Booting WEBrick
=> Rails 3.0.5 application starting in development on htttp://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-03-30 01:56:29] INFO WEBrick 1.3.1
[2011-03-30 01:56:29] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.7.0]
[2011-03-30 01:56:29] INFO WEBrick::HTTPServer#start: pid=3899 port=3000
But I need to run it under port 80, so running it as sudo gives me this:
$ sudo rails server -p 80
/Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate'
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem'
from /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin/rails:18:in `<main>'
More info:
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
$ sudo ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
$ rails -v
Rails 3.0.5
$ sudo rails -v
/Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate'
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem'
from /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin/rails:18:in `<main>'
$ gem list --local rails
*** LOCAL GEMS ***
rails (3.0.5)
$ sudo gem list --local rails
*** LOCAL GEMS ***
rails (3.0.5)
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0]
- INSTALLATION DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- RUBY EXECUTABLE: /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
- EXECUTABLE DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-10
- GEM PATHS:
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$ sudo gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0]
- INSTALLATION DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- RUBY EXECUTABLE: /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
- EXECUTABLE DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-10
- GEM PATHS:
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Any idea of what's going on?
How can I make it work with and without sudo?
RVM is preventing sudo from seeing the Rails binary.
To get around this, use rvmsudo:
> rails -v
Rails 2.3.11
> sudo rails -v
/Users/dan/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Users/dan/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
from /Users/dan/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
from /Users/dan/.rvm/gems/ree-1.8.7-2010.02#crm/bin/rails:18
> rvmsudo rails -v
Rails 2.3.11
You are using Rails 3, which uses Bundler, which installs gems on a per-user basis, so before you can run the app as a given user, you must first run bundle install while logged in as that user. I think that will make it work for you.
By the way, I assume you know that running anything as root is risky. You probably want to configure Apache and Passenger (or something like that) to serve up your Rails application over port 80.