I want to use the Terminal built into Aptana Studio 3. I have everything configured on iTerm2/Terminal. I'm developing a Rails project. I do the following to get the server going.
On the Aptana Terminal:
$ rails s
Could not find pg-0.17.1 in any of the sources
Run `bundle install` to install missing gems.
On the regular Terminal or iTerm2:
~ rails s
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2014-08-12 16:15:17] INFO WEBrick 1.3.1
[2014-08-12 16:15:17] INFO ruby 2.0.0 (2013-11-22) [x86_64-darwin13.2.0]
[2014-08-12 16:15:17] INFO WEBrick::HTTPServer#start: pid=2612 port=3000
Both Terminals are on the same working directory. I could do bundle install on Aptana Terminal, but it is a chain of errors that occurs. I had that similar situation with iTerm2 and Terminal, but it was a very long and tedious process.
How can I properly configure the Aptana Terminal ?
Related
I have started a project to update, which was updated also a couple of months ago, but today it's not running on the development, I have deleted Gemfile.lock and reinstall the gems & update the bundler but showing still.
Here are below I have attached the full specification of this project.
// Environment
$ ruby -v
- ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin20]
$ rails -v
- Rails 5.2.6
$ bundle -v
- Bundler version 2.2.31
macOS v12.0.1
When running the rails server it's showing like this below
user#Users-MacBook-Pro max-domain % rails server
=> Booting Puma
=> Rails 5.2.6 application starting in development
=> Run `rails server -h` for more startup options
Exiting
/Users/user/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-5.2.6/lib/active_record/type/adapter_specific_registry.rb:9:in `add_modifier': wrong number of arguments (given 3, expected 2) (ArgumentError)
.........
....
I don't even find any clue where can I fix that!
Would you please help me out with that?
Thanks
If you want Ruby 3.0.1 you need to be on Rails 6.1 (and above). Max ruby version for Rails 5.2 is 2.7.0.
Here's a compatibility table.
I have installed rails on windows using railinstaller.
Using a copy of Agile Web development with Rails as my guide to learn with.
So I want to use 3.2.14 as its closer to the version they used in the book.
However after I set that version.
C:\work>rails _3.2.14_ --version
Rails 3.2.14
and create my new rails env
C:\work>rails new demo
...
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
C:\work>cd demo
C:\work\demo>ls -p
Gemfile README.rdoc app/ config/ db/ log/ test/ vendor/
Gemfile.lock Rakefile bin/ config.ru lib/ public/ tmp/
When I now start a rails server I get version 4.0.0rc of rails running. Am I doing something wrong here?
C:\work>cd demo
C:\work\demo>rails server
=> Booting WEBrick
=> Rails 4.0.0.rc2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-08-15 10:08:39] INFO WEBrick 1.3.1
[2013-08-15 10:08:39] INFO ruby 1.9.3 (2013-05-15) [i386-mingw32]
[2013-08-15 10:08:39] INFO WEBrick::HTTPServer#start: pid=1652 port=3000
Run rails _3.2.14_ new demo to create a Rails 3.2.14 project.
I have recently added SSL for an Heroku hosted web app but now I cant run the app locally, the browser just spins forever and then in the terminal I get this error -
$ rails s
=> Booting WEBrick
=> Rails 3.2.12 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-07-22 11:46:26] INFO WEBrick 1.3.1
[2013-07-22 11:46:26] INFO ruby 1.9.3 (2013-02-22) [x86_64-darwin12.4.0]
[2013-07-22 11:46:26] INFO WEBrick::HTTPServer#start: pid=34732 port=3000
[2013-07-22 11:51:07] ERROR bad Request-Line `:\x00\x00\x00'.
I don't nessessarily need SSL for development so don't need to add the thin gem or nugenix but how can I get it to run locally again?
Ryan Bates had a nice little episode on the topic of adding SSL which addresses the development environment. The configuration involves pow and nginx. I will be soon trying it out for myself but not this week.
Problem solved! By adding pow as the server I can run the app normally :)
To add POW to your app run this command curl get.pow.cx | sh and then cd ~/.pow followed by ln -s /path/to/myapp.
POW is well documented on the website http://pow.cx/ and as mentioned by another user Ryan Bates has a great video on SSL which explains how to add POW to your app -http://railscasts.com/episodes/357-adding-ssl
I have Ruby v1.9.3 and Rails v3.2.3 on Win7. I have no problem generating a Rails directory and starting the Ruby server, but what happens is that once the server is started I have no prompt and no code I type seems to execute.
to be specific - here is the terminal code from a session:
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-04-30 06:25:06] INFO WEBrick 1.3.1
[2012-04-30 06:25:06] INFO ruby 1.9.3 (2012-02-16) [i386-mingw32]
[2012-04-30 06:25:06] INFO WEBrick::HTTPServer#start: pid=2112 port=3000
after this point there is no prompt and no command I type seems to produce a result (including ctrl-c).
what am I doing wrong?
This worked: Im doing a rails tutorial and this was the got me back on track. Ctrl-Pause/Break stopped the server.
I assume you're running rails server to get to this point.
Everything is working as it should. Rails is a web framework and when you run it in server mode it doesn't accept commands from the terminal. Instead Rails listens for web requests on port 3000 and responds appropriately. While the server is running the terminal window is displaying the internal server logs. Visit http://localhost:3000 while the server is running and you'll see what I mean.
If you want some command line interactivity, run rails console instead. This will load up your Rails environment but instead of listening for web requests on a port it'll give you an irb prompt where you can type ruby.
Ctrl-Pause/Break works. "Pause/Break" confused me for a little bit, so if you are new like me it is the key usually next to F12 that says "pause break". :)
I currently have:
$ rails s
=> Booting WEBrick
=> Rails 3.0.9 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-11-30 13:18:00] INFO WEBrick 1.3.1
[2011-11-30 13:18:00] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.8.0]
[2011-11-30 13:18:00] INFO WEBrick::HTTPServer#start: pid=4204 port=3000
The problem I'm having is I'm using openID for auth and getting the following error:
[2011-11-30 13:18:19] ERROR WEBrick::HTTPStatus::RequestURITooLarge
In the browser:
Request-URI Too Large
WEBrick::HTTPStatus::RequestURITooLarge
WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18) at macbook-pro.local:3000
How can I fix this? Can I update WEBrick or do I really need to use a different web server?
Thanks
In Ruby 1.9.3. source, it says that MAX_URI_LENGTH = 2083. That means that the latest version of Webrick can't handle urls longer that this. And that's what the WEBrick::HTTPStatus::RequestURITooLarge exception is telling you.
The solution therefore is to use a different web server. One of the most favourite ones is Thin:
sudo gem install thin
cd to/your/rails/app
thin -h
thin -a localhost start
Like said here, you could change the MAX_URI_LENGTH using this code:
WEBrick::HTTPRequest.const_set("MAX_URI_LENGTH", 10240)
I see you've tried unicorn: have you tried running it through bundler? Add:
gem :unicorn
to your Gemfile and run:
bundle exec unicorn_rails
to start the server and browse to http://localhost:8080.