I am hosting a rhoconnect app in my rhohub account. My rhomobile app requires rhoconnect 3.2 with ruby 1.9. How to find which version of ruby is rhohub using?
I am trying to improve the response time by adding the following lines in my config.ru file.
# adjust the EventMachine Thread Pool size
require 'eventmachine'
EventMachine.threadpool_size = 25
# Rhoconnect server flags
Rhoconnect::Server.set :use_async_model, true
# adjust the Rack FiberPool size
Rhoconnect::Server.set :fiberpool_size, 150
Command prompt and use ruby -v will give you the current installed Ruby version.
Regards,
Amit C.
Related
Before judging this question please listen to these details:
I have tried twenty million things to "update" ruby so that it is compatible with ruby on rails. The problem is that I cannot make changes to anything in the bin of my macbook. The terminal simply does not allow it. So, I installed a new version of ruby via the command line that is 2.5.1. How do I direct rails via the terminal to use this version instead of the version in my bin?
From the official Rails Guides website.
Rails 6 requires Ruby 2.4.1 or newer.
Rails 5 requires Ruby 2.2.2 or
newer.
Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
Rails 3.2.x is the last branch to support Ruby 1.8.7.
Rails 3 and above require Ruby 1.8.7 or higher.
While Rails 6 is still unreleased, this is a preliminary guess, given from the current master-branch of the official repository, at https://github.com/rails/rails/blob/master/guides/source/upgrading_ruby_on_rails.md
From edge-guides:
http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#ruby-versions
What I'm trying to do is to deploy a Ruby On Rails app on cPanel with shared hosting. I'm new to cPanel or anything to do with web hosting. Following the guides I managed to upload the app but when I run it, it gives me following Passenger error:
cannot load such file -- bundler/setup (LoadError)
Any response is much appreciated, thanks in advance.
What I have done so far:
cPanel's Setup Ruby App function
you need to install bundler as a module
As of 18 September 2017
Cpanel version 66 supports Ruby 2.2.7 and Rails 4.1.0 this is the highest version to date in the "Ruby Setup App" create a Ruby 2.2 Environment.
gem install rails -v 4.1.0
Assuming your hosting service has upgraded their cpanel software
(this should be the case since upgrading implies security fixes).
As of 18 September 2017 Cpanel version 66 supports Ruby 2.2.7 and Rails 4.1.0 this is the highest version to date in the "Ruby Setup App" create a Ruby 2.2 Environment.
To install rails you need to use the module setup ruby app
Then execute the command: gem install rails -v 4.1.0 --no-ri --no-rdoc
This should install rails, you're not going to get a later version than rails 4.1.0. Rails 3 breaks cpanel so don't try it.
cpanel might hang on this one, but it seems to deploy all the gems correctly. Wait a bit and then refresh - you should have rails installed
people,
I'm new to ROR, not bloody new (anymore) but unexperienced with moving apps to production. To understand how the move-to-production-flow works I created a very simple rails project. Here are some basic infos about my system (running on windows 7):
Ruby version 1.9.3 (i386-mingw32)
RubyGems version 1.8.24
Rack version 1.4
Rails version 3.2.8
JavaScript Runtime JScript
Active Record version 3.2.8
Action Pack version 3.2.8
Active Resource version 3.2.8
Action Mailer version 3.2.8
Active Support version 3.2.8
Application root C:/Sites/railstest
Environment development
Database adapter sqlite3
Database schema version 0
Middleware:
ActionDispatch::Static
Rack::Lock
#<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x2a70f20>
Rack::Runtime
Rack::MethodOverride
ActionDispatch::RequestId
Rails::Rack::Logger
ActionDispatch::ShowExceptions
ActionDispatch::DebugExceptions
ActionDispatch::RemoteIp
ActionDispatch::Reloader
ActionDispatch::Callbacks
ActiveRecord::ConnectionAdapters::ConnectionManagement
ActiveRecord::QueryCache
ActionDispatch::Cookies
ActionDispatch::Session::CookieStore
ActionDispatch::Flash
ActionDispatch::ParamsParser
ActionDispatch::Head
Rack::ConditionalGet
Rack::ETag
ActionDispatch::BestStandardsSupport
My webhost is webhostone.
And here is what I did:
Generate a new rails app called railstest using: rails new railstest
Updated the gemfile with the versions used on my webhost
run "bundle install --deployment" to have all the gems in vendor-directory.
FTP'ed everything to the webhost
successfully run bundle install via PuTTY
But when I call the site I always get something like this:
http://www.kernification.de/rails/info/properties
(I don't have enough reputations to post an image here...)
I've tried a lot more (I'm fighting for ~1.5weeks now with this issue) but it seems to be the same issue all the time. The webhost support told me the gems are located in 1.9.1, not in 1.8 and I have some questions about this:
What is 1.9.1 (or 1.8) the version of? Ruby? Gem?
How do I force to look for the gems in 1.9.1 instead of 1.8?
I also tried using pik as version manager but I will only use webhostone so far, so I happy if I have one version of ruby installed that is working. So far I don't need to switch between any versions. I also moved to xubuntu, created the same simple app there, same result.
Would be great if you could share your experience, thanks a lot!
The version numbers you listed match Ruby versions. It is possible to tell Rubygems where to look for the local gem repository through setting the GEM_HOME environment variable. But this is probably not what you want to do, as Bundler should provide all the gems.
By calling bundle install --deployment all gems your application needs should be bundled within the vendor/bundle directory. Therefore I don't understand why you call bundle install again on the deployment site.
You could check if your application folder on the deployment server contains the rake gem bundled into vendor/deploy.
I had a call with my webhost support and it looks like the issue was related to the apache configuration. It is still not fixed but the issue described above is gone. Now there is a new issue but this is a different story and I will search in this really great forum first.
Thanks a lot for your help.
I've been trying to get my Rails application to work TorqueBox and one of its requirements is to use JRuby as the Ruby language variant. I've installed JRuby 1.6.6 and the gemfile seems to bundle itself properly, but when the rails server is booted up and accessed within a browser (at localhost:3000 or 0.0.0.0:3000) then the webpage hangs...
I'm not sure if this is a problem with Rails 3.2 and the rails server does start fine (doesn't show any errors within the console) and the Rails 3.2 instance does work with Ruby 1.9.2. So I think it may be something with my gem file list or perhaps something within an initializer.
Any ideas if this is a common problem?
--- EDIT ---
I'm trying to access 0.0.0.0:3000 from WebBrick.
As far as I know torquebox 2.0 beta 3 is currently tested with jruby 1.6.5.1. Maybe try switching to that jruby version. Also make sure you're running ruby in 1.9 mode. To do that, create a torquebox.yml file in your rails config folder and put the below in it:
ruby:
version: 1.9
I have developed a Ruby on Rails application and successfully deployed on Weblogic using Jruby and Warbler (which creates a war file based on the settings in config/warble.rb).
I believe although Jruby comes with inbuilt Ruby 1.8 and 1.9, by default it uses 1.8 and I want to test the same rails application in Ruby 1.9 within JRuby as I heard that Ruby 1.9 is a lot faster than 1.8. I do not see any configuration option in warble.rb
where we can specify to use Ruby version to use. Whats the best way to force Jruby to use Ruby 1.9?
Also my Rails application is based on Rails 2.3.2, are there any compatability issues on running rails application (built on 2.3.2) on Ruby 1.9? If so will upgrading rails to 2.3.5 solve the problem?
Thanks in advance.
you specify it as an argument on the command line
jruby --1.9 -v
Don't know about the compatibility issues.
I follow configuration guide of JRuby https://github.com/jruby/jruby/wiki/ConfiguringJRuby and it work.
Create .jrubyrc in user directory (C:\Users\tvo1510 on Window 7) with content:
compat.version=1.9
It's done.
Cheers,
in config/warble.rb, look for this line:
# config.webxml.jruby.compat.version = "1.9"
uncomment it and re-run warble.