I have problem installing devdocs in my mac.
I tried to do the steps there but I'm stucked installing bundler.
I tried the following in the terminal:
gem install bundler //this worked
bundle install //this prints error: Bundler::GemfileNotFound
I already have the latest Ruby version required but still printing the same error.
I tried to execute bundle install in the path where the gemfile is still the same error.
I needed to install this in my pc for offline browsing. For those who successfully installed this in their mac machine, please help me.
This error indicates that you're trying to run the command in a directory that does not contain any Gemfile. I think that in your local directory, you forgot to clone the devdocs Git repo. So go to your local devdocs directory and type:
git clone https://github.com/Thibaut/devdocs
Then go to this directory, and type the following commands:
bundle install
thor docs:download --all
rackup
That should work, and devdocs should be available at localhost:9292. If that does not, maybe your ruby version is too old (devdocs requires Ruby 2.1.0 or greater). In this case, I strongly recommend you to us rvm to update ruby (rvm install ruby-2.1.0).
Related
On Ubuntu 18.04 using the instructions here I've installed OpenLiteSpeed via the CyberPanel install, and then installed Ruby using the following commands in the terminal/console:
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
apt install rbenv libreadline-dev ruby-dev -y
export TMPDIR=/mytmp/
rbenv install 2.5.0
rbenv global 2.5.0
gem install rack -v 1.6.11
gem install ruby-lsapi
But now I'm confused about the paths and where to "setup context". The instructions above show the default ruby location different to the instructions for Litespeed and different to where I've found ruby on the server and the ENV values. The locations on the server for 'ruby' are:
/root/.rbenv/versions/2.5.0/bin/ruby
/root/.rbenv/shims/ruby
/etc/apparmor.d/abstractions/ruby
The command gem env shows the following:
Installation directory: /var/lib/gems/2.5.0
User installation directory: /root/.gem/ruby/2.5.0
Ruby executable: /usr/bin/ruby2.5
Executable directory: /usr/local/bin/
In the OpenLiteSpeed admin panel under Server Configuration > App Server I've found Rack/Rails Default Settings. What should I add here for Ruby Path and what other configuration would I need to do please?
I have limited knowledge of Ubuntu/Linux and OpenLiteSpeed, and almost zero knowledge about Ruby.
EDIT: I'm installing Ruby only because I want to install and test ShareTribe which requires Ruby.
EDIT: I've removed Ruby 2.5 and installed 2.6 with the following commands:
sudo apt-get purge ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.gz
tar -xzvf ruby-2.6.6.tar.gz
cd ruby-2.6.6/
./configure
make ...SLOW
sudo make install
All looked good so far, but then the next command gem install bundler gave the error /usr/bin/gem: no such file or directory. So another path error.
From the docs you've linked to it seems you have a few issues, some are not related at all to ruby. However it seems that the documentation for using Ruby on Rails in OpenLiteSpeed are instructing you to use a older version of Ruby than what is required in the documentation for ShareTribe requirements which seem to require you use Heroku for hosting your application. There may be ways to get all of this work on other platforms, but you are traversing the waters of DevOps Hell in which case you may want to post some questions on https://devops.stackexchange.com/
From what I can see you'll need to follow instructions to install ruby 2.65 in place of 2.5.0 but you may want to check with OpenLiteSpeed support to make sure it is supported.
As for SharTribe you'll also want to find out if they will support running on your Digital Ocean droplet.
I installed rvm on my Linux machine and download simple project from github. I tried to run rails s, but got a error with ruby version:
I executed next commands:
rvm install ruby-2.3.0
rvm use ruby-2.3.0
rvm use ruby-2.3.0 --default
When I opened the project and ran rails s, I got this error
https://i.imgur.com/Dwvp8WF.png
Update
My Gemfile has ruby 2.3.0
Can't run bundle install because of this error https://imgur.com/a/UMcirdt
w
which rails, which ruby: https://imgur.com/a/vycG8wG
I haven't used rvm, but I'm using rbenv for version management.
From what I've read, it works similarly, although the commands are a little bit different.
Did command rvm use ruby-2.3.0 inside the project folder generate a file called .ruby_version?
It should list the current version of ruby used in this project
After checked the errors on your updated screenshot, I think it's better just do this:
rm -r ~/.bundle
bundle
bundle install
Maybe just
rvm reinstall all
then try again.
If permission error happens, run
rvm fix-permissions
And then do it again.
I installed redmine on my server.
Redmine is installed in /usr/share/redmine.
I try to install redmine backlogs using the installation guide)
As mentionned in the guide, I execute the following commands:
cd /usr/share/redmine
bundle exec rake redmine:backlogs:install
It fails with the message: Could not locate Gemfile
It looks like the bundle command is waiting for a gemfile in the directory but this file is missing.
Do you have any idea how to solve this problem?
EDIT: Note that I installed Redmine using the Wheezy backports. Maybe we cannot install plugins when Redmine has been installed from the Debian package....
Thank you
That url is for sale now, your best bet is to build it from source from the most currently updated fork from that project which is: https://github.com/ahelten/redmine_backlogs
Try this:
cd ~/redmine/plugins
git clone https://github.com/ahelten/redmine_backlogs.git
git checkout feature/v1.0.6_inherit_fields
Install libs and gems needed by backlogs
sudo apt-get install libxslt-dev libxml2-dev
sudo gem install nokogiri -v '1.5.11'
bundle install
Test Your Work
bundle exec rails server webrick -e production
NOTE: this assumes that you have git and whatever other development tools and gems you need installed. If you fail to install a gem, scroll up and read the output, chances are you need to add a package mentioned in the output first (sudo apt-get install foo). If you fail to find a gem you are either building in a directory without a Gemfile or the gem the gem file wants doesn't exist ... search rubygems.org if that happens)
I installed cocoapods on OSX 10.9.3 Mavericks.
The installation finished fine, but I cannot run the pod update command. as nothing was added to my PATH. I am trying to find the /usr/local/Cellar/ruby folder to find the pod file to put in my PATH, but no such folder exists.
Where is the cocoapod file installed, and what I need to add in my PATH to make it work?
Cocoapods is installed using Ruby Gems. If you do not have a previous Ruby installation, you can go ahead and install using SUDO, which will use the OSX system default Ruby installation. But if you have a local version of Ruby already running for whatever reason, using SUDO will not work as the pod binary will be installed in the System default Ruby folder instead of the local version where it should be really installed for all the PATH and environment variable to work correctly. Just using gem install should work in this case.
If you have a local version of ruby rvm
gem install cocoapods
instead of
sudo gem install cocoapods
I am trying to setup my rails application on Windows 7 machine. I installed Ruby 1.9.3 by using installer. I also installed Rails 3.2.2.
Now, I am trying to run bundle install from my application root directory. This command used to install all the required gems. However, when I am running in this new machine its not installing. I have to install all the gems manually one by one.
I know its bit strange but I am facing this for the first time..!!
Edit 1: Please refer below screen-shot.
Note: I have already installed few gems manually before posting here. The error related to DevKit that I am getting below has just came while I was tried to install json gem..
After Installing more gems manually:
If you read the error, it tells you that you need DevKit to install that gem on Windows. So install that and follow the instructions, then try again ;) After the json gem can be installed, it should install every other gem in the Gemfile.
(The json gem is a dependency from Rails)