Rails script installation fail

Hi Received error while installing Rails script.. Error description is -> ERROR: Error installing camping: rack requires Ruby version >= 2.2.2

Please also find attached screenshot. Please help me to solve this error..

Thanks, Nitin

Status: 
Active

Comments

Hi I was able to install ruby 2.3.0 and rails 5.1.0 using "rbenv" .. I was able to create "rails script" for "5.1.0" partially .. I could see the project folder by connecting server using SSH and bundle install it ..

But When I start the server, I get below error (though I mentioned gem within Gemfile, also installed it through command line), please suggest how to resolve the issue:

/usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:87:in block in materialize': Could not find minitest-5.10.1 in any of the sources (Bundler::GemNotFound) from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:80:inmap!' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:80:in materialize' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/definition.rb:176:inspecs' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/definition.rb:235:in specs_for' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/definition.rb:224:inrequested_specs' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:118:in block in definition_method' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:19:insetup' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler.rb:100:in setup' from /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/setup.rb:20:in' from /usr/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in require' from /usr/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:inrescue in require' from /usr/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in require' from /home/projects/public_html/ror510p2/config/boot.rb:3:in' from bin/rails:3:in require_relative' from bin/rails:3:in'

Howdy -- thanks for contacting us!

It's looking like there may be some problems installing Ruby on Rails with the packages being provided in CentOS 7.

That's a fairly big issue, unfortunately -- it sounds like they're now requiring packages that are newer than what's in CentOS 7. if Rails doesn't support the packages provided by CentOS 7, it's going to be difficult for us to support that.

However, I'm curious if we can get that working in your case by installing the minitest gem.

Try installing that with this command:

gem install minitest

After that, are you able to complete the Rails installation?

Hi Thank you for your reply ... Trust all is well .. Which OS works best with Virtualmin's Ruby on rails script? We will try to install that OS.. Thanks, Nitin

Hi - With ubuntu we are able to create partial Rails application using Rails Install Script. However we receive below Puma error while "starting the server" .. Please assist to solve this error - Thank You:

Error Details=>

/var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:484:in handle_argument_error': ERROR: "rails server" was called with arguments ["/ror1"] (Thor::InvocationError) Usage: "rails server [puma, thin etc] [options]" from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:34:inrescue in run' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:21:in run' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:ininvoke_command' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in dispatch' from /var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/command/base.rb:63:inperform' from /var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/command.rb:44:in invoke' from /var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/commands.rb:16:in' from bin/rails:4:in require' from bin/rails:4:in'

Ruby apps can occasionally be tricky, as they can be moving targets as far as what dependencies they require. For awhile it worked great on CentOS 7, but it's looking like that's no longer the case. We'll have to look deeper into how best to handle that in the future.

As far as the error you're seeing there on Ubuntu... I've unfortunately not seen that before, and Googling the error hasn't provided a lot of insight.

Jamie, do you have any thoughts on the error seen above in comment #4?

No, that's not one I've seen before.

Is ruby on your system the latest version, installed from source?

Hello Jamie -- Thank you for reply .. Yes - I use almost latest ruby - ruby 2.3 and rails 5.1.0 .. Scenario - 1> When I install RAILS script with option ==> Run Mongrel server? =YES, and Start the serve => then I receive error = >" ERROR: "rails server" was called with arguments ["/ror1"] (Thor::InvocationError) Usage: "rails server [puma, thin etc] [options]"

My observation : ""rails server" command expects argument "[puma, thin etc] [options]". But VirtualMin RAILS script provides argument "ror1" to command "rails server" .. "ror1" is the rails application name

Scenario - 2> When I install RAILS script with option ==> Run Mongrel server? =NO, I am able to create the RAILS application, and start the server from "Virtualmin Panel" ... But when I access the URL, I get this error => Forbidden You don't have permission to access /ror1/ on this server -- Apache/2.4.18 (Ubuntu) Server .

Hi 1> I created new ROR application on Centos 7 .. Ruby version is 2.4.x(installed from source not by using - RVM or rbenv) .. Rails version is 5.1.0 .. I still face the problem, pointers to solve the problem will highly be appreciated.. Thank You!!

Please find the more details about errors and setup below:

2> After starting server we get below log within Virtualmin Panel:

Starting up the server process for Ruby on Rails .. .. failed : Server did not start : => Booting Puma => Rails 5.1.0 application starting in production on http://0.0.0.0:3001 => Run rails server -h for more startup options Puma starting in single mode... * Version 3.8.2 (ruby 2.4.1-p111), codename: Sassy Salamander * Min threads: 5, max threads: 5 * Environment: production * Listening on tcp://0.0.0.0:3000 Use Ctrl-C to stop

3> When I try to access the URL within browser, I get this error => Forbidden You don't have permission to access /ror1/ on this server -- When I checked the error log after connecting server using SSH, got below error:

Cannot serve directory /home/rails5/public_html/: No matching DirectoryIndex (index.html,index.htm,index.php,index.php4,index.php5) found, and server-generated directory index forbidden by Options directive

4> I selected below options, while installing the RAILS script: Installed At top level (not sub directory)- at - public_html
Run Mongrel server? Yes
Use development mode? No Number of Rails server processes 1

Thank You again for your help!!

One more point to add - When I start server from "terminal console" (after connecting server using SSH), I am able to access Rails application using IP:port within browser. But when I try to access the URL (using domain name) within browser, I get this error => Forbidden You don't have permission to access / on this server