Ruby On Rails on Win 10 - ruby-on-rails-3

On win 10, After installing RoR 3.x and Ruby 7.x, and sqlite 3.x, the server will not start from CLI, I am not using Windows Powershell but the CMD window.
Does any part of the install of those packages require Admin window?
Does the "bin/rails server" command require Admin privileges from CLI.
Thank You

Not really.
I installed Rails in my Windows Computer, but I needed to install Node and Yarn as well.
I suggest you install WSL for Windows. It's like have Linux install but using Windows. It's faster than Windows and you will have less problems by installing Rails or any other software.
Check this link: https://learn.microsoft.com/es-es/windows/wsl/install
You need to use PowerShell as Administrator and run the command wsl --install (see pc requirements)

Related

Linux Subsystem can't install and recognize packages

I am using windows and didn't wanted to switch to linux. I still wanted to learn it so I downloaded ubuntu subsystem for windows. It works fine and I can also execute linux commands on it. But the problem is I can't check my pip version using "pip --version" command also I can't access nodejs . It says that node isn't recognized. But it is working fine on my cmd windows terminal. How can I make it work ? Do I really have to download all these packages again after running "sudo apt update" command.
Yes, you have to download all these packages again for Ubuntu-WSL. That is because WSL is not compatible with windows executable, just like Ubuntu is supposed to be.

Command line to install/upgrade .NET Core

Are there command line commands to install or upgrade .NET Core?
I checked to see if I had .NET Core was installed on my computer using dotnet --version only to notice that I still had the preview version installed on my computer. I was wondering if I could issue some commands to upgrade it to the latest version.
There is no dotnet command to update .Net Core. Instead, you should use the same approach you used to install it in the first place, which depends on your OS.
Not promoted officially but it looks like there are approved packages on Chocolatey for .NET Core SDK.
https://chocolatey.org/packages/dotnetcore-sdk
Example:
> choco install dotnetcore-sdk
Or:
> choco upgrade dotnetcore-sdk
Update (December 2020): For .NET 5 the chocolatey package has changed since it's not technically branded as .NET Core any longer.
https://chocolatey.org/packages/dotnet-sdk/
Example:
> choco install dotnet-sdk
Or:
> choco upgrade dotnet-sdk
If you have WinGet, then you can use it to install (or update) .NET:
winget install Microsoft.DotNet.SDK.Preview # currently .NET 7
winget install Microsoft.DotNet.SDK.6
winget install Microsoft.DotNet.SDK.5
winget install Microsoft.DotNet.SDK.3_1
Run from an admin prompt
For those who find this on search, there are dotnet-install scripts you can use. For example:
# Windows PowerShell
Invoke-WebRequest -Uri https://dot.net/v1/dotnet-install.ps1 -OutFile "$env:temp/dotnet-install.ps1"; powershell -executionpolicy bypass "$env:temp/dotnet-install.ps1"
# PowerShell Core
Invoke-WebRequest -Uri https://dot.net/v1/dotnet-install.ps1 -OutFile "$env:temp/dotnet-install.ps1"; pwsh "$env:temp/dotnet-install.ps1"
# Shell
wget https://dot.net/v1/dotnet-install.sh && chmod +x ./dotnet-install.sh && sudo ./dotnet-install.sh
* Note the default install location for these is different than the official installers; as said in another answer the easiest path to update is to use the same method you first installed with.
Edit: apt packages for Ubuntu 22.04+ now includes dotnet6 for the SDK. Other dotnet packages, such as just the runtime (dotnet-runtime-6.0, aspnet-runtime-6.0) can be installed as well.
sudo apt update
sudo apt install dotnet6
Just a heads up so you (or other people) don't struggle for hours as I did.
.NET Core 1.1.0 ships with SDK 1.0.0 Preview 2 (when this is written), but you need SDK 1.0.0 Preview 3.
Download and install .NET Core 1.1.0 as #svick suggested, then download and install SDK Preview 3 from: https://github.com/dotnet/core/blob/master/release-notes/preview3-download.md

Ubuntu Appcelerator - Cannot install node on platforms other than windows or mac

Appc is successfully setup via terminal. Each prerequisite installed but on Studio launch Appcelerator cannot find/recognize installed node and tries to install node again and prompts "cannot install node on platforms other than windows or mac".
Since I am using the latest version of Titanium so it requires the latest Node.js (nodejs, node and npm). Appcelerator tries to install node because it does not find any compatible version.
Secondly Appcelerator tries to install all pending prerequisites and it cannot install node on platforms other than windows or mac so you have to install nodejs via terminal.
To debug issues try to run programs via terminal. Particular to Appcelerator in Ubuntu, go the directory and run it by command $ ./AppceleratorStudio
It will prompt all ERRORS, WARNINGS and NOTICES.

How can I build an RPM package in a Debian based system?

I'd like to build packages using a build system (i.e. jenkins, travis, etc) but all I have are Ubuntu 12.04 VMs.
I've found this [1] instructions but mach does not support CentOS 7.0.
[1] http://blog.burghardt.pl/2008/12/how-to-build-rpm-packages-in-centos-chroot-on-debian/
http://mojo.codehaus.org/rpm-maven-plugin/ <- rpm plugin for the maven build system
sudo apt-get install rpm # for Ubuntu
Check out the command that it installs called rpmbuild.
Found it! There is actually a tool called rinse: "Rinse is a simple tool which is designed to carry out the installation of a new RPM-based distribution".
rinse --distribution="centos-7" --directory="/tmp/centos-7"
http://collab-maint.alioth.debian.org/rinse/

RubyMine, Vagrant, RVM

I'm on OS X host where I have RubyMine (7) and last Vagrant installed. I've prepared shell script for provision my vagrant box with RVM, ruby (2.1.2), bundle my project, run all tests, manually start server. Everything seems fine.
Now I want to make RubyMine works with RVM ruby from vagrant guest (run server, specs with debugging). I've added remote ruby SDK, point them to RVM ruby binary (http://prntscr.com/5i6g1f). But when I try to start development server, I've receive message that no rails installed in SDK. But it is installed via bundle, I can run server manually from guest.
Please, advice me how can I tell RubyMine where to find gems inside Vagrant with RVM?
Thanks :)
When using RVM, the path to remote SDK should not point to the binary but rather to the ruby gems directory.
In your case, for instance, the correct path should be:
/home/vagrant/.rvm/gems/ruby-2.1.2
Note that it should point to the DIRECTORY not the executable!
To find the directory simply run:
$ rvm gemdir
Then copy and paste the result.
change the path to ruby
from: /path/to/rvm/rubies/ruby-version/bin/ruby
to: /path/to/rvm/wrappers/ruby-version/ruby
Same problem if any rbenv user face then type "which ruby" without quotes in terminal it will point to the shims folder of rbenv but select versions folder and select irb instead of ruby as rubymine need irb (ruby interpreter) instead of ruby binary.